Uh oh!
There was an error while loading. Please reload this page.
[pull] dev from anomalyco:dev - #266
Conversation
@fwang is attempting to deploy a commit to the adevloper152's projects Team on Vercel. A member of the Team first needs to authorize it. |
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR updates GitHub and site statistics, centralizes stats-page star fallbacks, adds ChangesGitHub star fallback
Console display metrics
Provider and schema updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 2⚔️ Resolve merge conflicts 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
|
| Overall Grade Focus Area: Reliability | Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| JavaScript | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Shell | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Secrets | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Docker | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Python | Aug 6, 2026 11:37p.m. | Review ↗ | |
| CSS | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Rust | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Ruby | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Swift | Aug 6, 2026 11:37p.m. | Review ↗ | |
| PHP | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Lua | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Java | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Go | Aug 6, 2026 11:37p.m. | Review ↗ | |
| C & C++ | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Ansible | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Apex | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Elixir | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Groovy | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Objective-C | Aug 6, 2026 11:37p.m. | Review ↗ | |
| PowerShell | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Terraform | Aug 6, 2026 11:37p.m. | Review ↗ | |
| VB.NET | Aug 6, 2026 11:37p.m. | Review ↗ | |
| SQL | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Scala | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Perl | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Kotlin | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Helm | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Erlang | Aug 6, 2026 11:37p.m. | Review ↗ | |
| Dart | Aug 6, 2026 11:37p.m. | Review ↗ | |
| C# | Aug 6, 2026 11:37p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/console/core/src/schema/referral.sql.ts`:
- Line 34: Add a schema index declaration in the referral table definition
alongside the composite primary key, using referralID as the leading column and
matching the existing referral_id database migration index. Keep the current
primary key unchanged so referralID-only queries are efficiently supported and
the schema remains aligned.
In `@packages/stats/app/src/routes/stats-shell.tsx`:
- Around line 19-22: Fix compactNumberFormatter so it no longer combines compact
notation with roundingIncrement: remove roundingIncrement, or round raw counts
before formatting while preserving accurate K, M, and B values. Add coverage for
representative K, M, and B boundary cases, including the reported counts.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 49abd5d3-5a53-403c-8197-6a499c744a00
📒 Files selected for processing (9)
packages/console/app/src/config.tspackages/console/app/src/routes/zen/util/handler.tspackages/console/core/src/schema/billing.sql.tspackages/console/core/src/schema/referral.sql.tspackages/stats/app/src/component/model-compare-detail.tsxpackages/stats/app/src/routes/[lab]/[model].tsxpackages/stats/app/src/routes/[lab]/index.tsxpackages/stats/app/src/routes/compare/index.tsxpackages/stats/app/src/routes/stats-shell.tsx
💤 Files with no reviewable changes (1)
- packages/console/core/src/schema/billing.sql.ts
| primaryKey({ columns: [table.workspaceID, table.referralID] }), | ||
| index("referral_id").on(table.referralID), | ||
| ], | ||
| (table) => [primaryKey({ columns: [table.workspaceID, table.referralID] })], |
There was a problem hiding this comment.
🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bashset -euo pipefail
rg -n -C 12 '\bReferralRewardTable\b|\breferralID\b' \
packages/console/core/src --glob '*.ts'Repository: bolt-builder/bolt-cli
Length of output: 29733
🏁 Script executed:
#!/usr/bin/env bashset -euo pipefail
printf'%s\n''--- referral schema and related indexes ---'
cat -n packages/console/core/src/schema/referral.sql.ts
rg -n -C 8 'referral_reward|ReferralRewardTable|referralID' \
packages/console/core/src packages/console/core/drizzle packages/console/core/migrations 2>/dev/null ||trueprintf'%s\n''--- standalone behavioral check: composite-key leftmost-prefix usability ---'
python3 - <<'PY'predicates = { "summary": {"workspaceID"}, "inviteeRewards": {"referralID"}, "applyReward": {"workspaceID", "referralID"}, "usagePreview": {"workspaceID", "referralID"}, "create reward readback": {"referralID", "workspaceID"}, "completeFromLiteSubscription": {"referralID", "workspaceID"},}key = ("workspaceID", "referralID")for name, columns in predicates.items(): usable_prefix = 0 for column in key: if column not in columns: break usable_prefix += 1 print(f"{name}: predicates={sorted(columns)}; composite_pk_prefix_columns={usable_prefix}")PYRepository: bolt-builder/bolt-cli
Length of output: 50378
🏁 Script executed:
#!/usr/bin/env bashset -euo pipefail
snapshot=$(fd -i 'snapshot.json' packages/console/core/migrations | head -n 1)printf'snapshot=%s\n'"$snapshot"
python3 - "$snapshot"<<'PY'import jsonimport syspath = sys.argv[1]data = json.load(open(path))for key, values in data.get("tables", {}).items(): if "referral_reward" not in key: continue print(f"table key: {key}") print(json.dumps(values, indent=2))PYprintf'%s\n''--- migration statements mentioning referral_reward ---'
rg -n -C 10 'referral_reward|referral_reward_referral|referral_reward_workspace' \
packages/console/core/migrations --glob '*.sql' --glob '*.ts' --glob '*.json' \
| rg -v 'snapshot.json'| head -n 300
printf'%s\n''--- verifier: usable leading index columns ---'
python3 - <<'PY'indexes = { "PRIMARY": ("workspaceID", "referralID"),}predicates = { "summary": ("workspaceID",), "inviteeRewards": ("referralID",), "applyReward": ("workspaceID", "referralID"), "usagePreview": ("workspaceID", "referralID"), "create reward readback": ("referralID", "workspaceID"), "completeFromLiteSubscription": ("referralID",),}for query, columns in predicates.items(): usable = 0 for indexed in indexes["PRIMARY"]: if indexed not in columns: break usable += 1 print(f"{query}: PRIMARY usable prefix={usable}/{len(indexes['PRIMARY'])}")PYRepository: bolt-builder/bolt-cli
Length of output: 10742
🏁 Script executed:
#!/usr/bin/env bashset -euo pipefail
printf'%s\n''--- migration order and latest referral_reward changes ---'
fd -t f . packages/console/core/migrations | sort | tail -n 20
forfilein \
packages/console/core/migrations/20260516082200_long_spirit/migration.sql \
packages/console/core/migrations/20260516110447_classy_wilson_fisk/migration.sql \
packages/console/core/migrations/20260803084635_married_misty_knight/migration.sql
doprintf'\n--- %s ---\n'"$file"
cat -n "$file"doneprintf'%s\n''--- migration journal and Drizzle configuration ---'
fd -t f -i '(journal|drizzle|config)' packages/console/core packages/console --max-depth 4 2>/dev/null \
| sort
rg -n -C 8 'migrationsFolder|schema|drizzle-kit|20260803084635|referral_id' \
packages/console/core packages/console --glob '!**/snapshot.json' --glob '!**/node_modules/**' \
| head -n 250
printf'%s\n''--- deterministic migration-state model ---'
python3 - <<'PY'indexes = {"PRIMARY": ("workspace_id", "referral_id")}events = [ ("initial", "add", "referral_reward_referral_source", ("referral_id", "source")), ("20260516082200", "drop", "referral_reward_referral_source", None), ("20260516110447", "drop", "referral_reward_workspace_time", None), ("20260516110447", "replace", "PRIMARY", ("workspace_id", "referral_id")), ("20260803084635", "add", "referral_id", ("referral_id",)),]for migration, action, name, columns in events: if action == "drop": indexes.pop(name, None) elif action == "replace": indexes[name] = columns else: indexes[name] = columns print(migration, action, name, "=>", dict(indexes))print("current referral_id-leading index:", any(columns[0] == "referral_id" for columns in indexes.values()))PYRepository: bolt-builder/bolt-cli
Length of output: 27249
Declare the referralID index in the schema.
inviteeRewards and completeFromLiteSubscription query referralID without an equality predicate on workspaceID. The composite primary key cannot efficiently support these lookups. Although 20260803084635_married_misty_knight creates referral_id, referral.sql.ts does not declare it. Add an equivalent referralID-leading index to keep the schema and database aligned.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/console/core/src/schema/referral.sql.ts` at line 34, Add a schema
index declaration in the referral table definition alongside the composite
primary key, using referralID as the leading column and matching the existing
referral_id database migration index. Keep the current primary key unchanged so
referralID-only queries are efficiently supported and the schema remains
aligned.
| const compactNumberFormatter = new Intl.NumberFormat("en", { | ||
| notation: "compact", | ||
| maximumFractionDigits: 1, | ||
| maximumFractionDigits: 0, | ||
| roundingIncrement: 5, |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bashset -euo pipefail
bun -e 'const formatter = new Intl.NumberFormat("en", { notation: "compact", maximumFractionDigits: 0, roundingIncrement: 5,})for (const value of [194_999, 197_500, 1_234_567, 2_499_999, 2_750_000]) { console.log(value, formatter.format(value))}'Repository: bolt-builder/bolt-cli
Length of output: 200
🏁 Script executed:
#!/usr/bin/env bashset -euo pipefail
printf'%s\n''--- target file ---'
sed -n '1,80p' packages/stats/app/src/routes/stats-shell.tsx
printf'%s\n''--- available runtimes ---'command -v node ||true
node --version 2>/dev/null ||truecommand -v deno ||true
deno --version 2>/dev/null ||trueprintf'%s\n''--- Intl behavior ---'
node <<'JS'const values = [194_999, 197_500, 1_234_567, 2_499_999, 2_750_000]const options = { notation: "compact", maximumFractionDigits: 0, roundingIncrement: 5,}try { const formatter = new Intl.NumberFormat("en", options) for (const value of values) console.log(value, formatter.format(value)) console.log("resolved", formatter.resolvedOptions())} catch (error) { console.log(error.name, error.message)}JSRepository: bolt-builder/bolt-cli
Length of output: 3867
Remove roundingIncrement or round the raw count before compact formatting.
This formatter returns incorrect values, such as 1,234,567 → 0M and 2,750,000 → 5M. Add tests for the K, M, and B boundaries.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/stats/app/src/routes/stats-shell.tsx` around lines 19 - 22, Fix
compactNumberFormatter so it no longer combines compact notation with
roundingIncrement: remove roundingIncrement, or round raw counts before
formatting while preserving accurate K, M, and B values. Add coverage for
representative K, M, and B boundary cases, including the reported counts.
A-x6
commented
Aug 7, 2026
@codesmith-bot fix all merge conflcits then merge |
Uh oh!
There was an error while loading. Please reload this page.
@DevFlex-AI
Merged. The only conflict was in exportconstgithubLink={href: "https://github.com/Bolt-builder/bolt-cli/actions/workflows/publish.ym",apiHref: "https://api.github.com/repos/bolt-builder/bolt-cli",fallbackStars: "195K",}The merge commit |
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
$orgplaceholders in provider payloads alongside$workspace.