Skip to content

[pull] dev from anomalyco:dev - #266

Merged
DevFlex-AI merged 4 commits into
bolt-builder:devfrom
anomalyco:dev
Aug 7, 2026
Merged

[pull] dev from anomalyco:dev#266
DevFlex-AI merged 4 commits into
bolt-builder:devfrom
anomalyco:dev

Conversation

@pull

@pull pull Bot commented Aug 6, 2026

Copy link
Copy Markdown

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 : )


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Improvements
    • Updated landing-page statistics to reflect 195K GitHub stars, 950 contributors, and 16M monthly users.
    • Refreshed statistics pages to display the updated GitHub star count consistently.
    • Improved compact number formatting by rounding values in increments of five.
    • Added support for $org placeholders in provider payloads alongside $workspace.

@pull pull Bot locked and limited conversation to collaborators Aug 6, 2026
@pull pull Bot added ⤵️ pull merge-conflict Resolve conflicts manually labels Aug 6, 2026
@github-actions
github-actions Bot requested a review from DevFlex-AI August 6, 2026 20:37
@bolt-builder bolt-builder unlocked this conversation Aug 6, 2026
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

@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.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 608f216f-e8a9-4538-92ba-159d608f6f5e

📥 Commits

Reviewing files that changed from the base of the PR and between dc898ca and 69f2cba.

📒 Files selected for processing (1)
  • packages/console/app/src/routes/zen/util/handler.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/console/app/src/routes/zen/util/handler.ts

📝 Walkthrough

Walkthrough

The PR updates GitHub and site statistics, centralizes stats-page star fallbacks, adds $org payload expansion, and removes selected billing and referral indexes.

Changes

GitHub star fallback

Layer / File(s) Summary
Shared fallback formatting
packages/stats/app/src/routes/stats-shell.tsx
The shared fallback is now 195K. Compact formatting uses no fractional digits and rounds in increments of five.
Stats header integration
packages/stats/app/src/component/model-compare-detail.tsx, packages/stats/app/src/routes/[lab]/*, packages/stats/app/src/routes/compare/index.tsx
Stats headers now use githubLink.fallbackStars instead of the hardcoded 150K value.

Console display metrics

Layer / File(s) Summary
Static metric updates
packages/console/app/src/config.ts
GitHub stars, contributors, and monthly users are updated to 195K, 950, and 16M.

Provider and schema updates

Layer / File(s) Summary
Organization payload placeholder
packages/console/app/src/routes/zen/util/handler.ts
Provider payload replacement now supports $org, derived from the authenticated workspace ID.
Schema index removal
packages/console/core/src/schema/billing.sql.ts, packages/console/core/src/schema/referral.sql.ts
The billing unique index and referral secondary index are removed. The referral composite primary key remains.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: devflex-ai

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description does not provide the required issue, change summary, verification, UI evidence, or checklist sections. Use the repository template and document the issue, change details, verification steps, screenshots if applicable, and checklist status.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the automated branch merge from anomalyco:dev and matches the pull request objective.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 2
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch dev
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@deepsource-io

deepsource-io Bot commented Aug 6, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in a210877...69f2cba on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

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.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

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.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Hey! Your PR title [pull] dev from anomalyco:dev doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between a210877 and dc898ca.

📒 Files selected for processing (9)
  • packages/console/app/src/config.ts
  • packages/console/app/src/routes/zen/util/handler.ts
  • packages/console/core/src/schema/billing.sql.ts
  • packages/console/core/src/schema/referral.sql.ts
  • packages/stats/app/src/component/model-compare-detail.tsx
  • packages/stats/app/src/routes/[lab]/[model].tsx
  • packages/stats/app/src/routes/[lab]/index.tsx
  • packages/stats/app/src/routes/compare/index.tsx
  • packages/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] })],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -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 bash
set -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 || true

printf '%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}")
PY

Repository: bolt-builder/bolt-cli

Length of output: 50378


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

snapshot=$(fd -i 'snapshot.json' packages/console/core/migrations | head -n 1)
printf 'snapshot=%s\n' "$snapshot"

python3 - "$snapshot" <<'PY'
import json
import sys

path = 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))
PY

printf '%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'])}")
PY

Repository: bolt-builder/bolt-cli

Length of output: 10742


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- migration order and latest referral_reward changes ---'
fd -t f . packages/console/core/migrations | sort | tail -n 20
for file in \
  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
do
  printf '\n--- %s ---\n' "$file"
  cat -n "$file"
done

printf '%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()))
PY

Repository: 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.

Comment on lines 19 to +22
const compactNumberFormatter = new Intl.NumberFormat("en", {
notation: "compact",
maximumFractionDigits: 1,
maximumFractionDigits: 0,
roundingIncrement: 5,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -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 bash
set -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 || true
command -v deno || true
deno --version 2>/dev/null || true

printf '%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)
}
JS

Repository: 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.

@DevFlex-AI

Copy link
Copy Markdown

@codesmith-bot fix all merge conflcits then merge

@blacksmith-sh

blacksmith-sh Bot commented Aug 7, 2026

Copy link
Copy Markdown

Got it, I'm analyzing the merge conflicts first.

View with [code]smith

@DevFlex-AI
DevFlex-AI merged commit 130f75c into bolt-builder:dev Aug 7, 2026
35 of 38 checks passed
@blacksmith-sh

blacksmith-sh Bot commented Aug 7, 2026

Copy link
Copy Markdown

@DevFlex-AI

@codesmith-bot fix all merge conflcits then merge

Merged. The only conflict was in packages/stats/app/src/routes/stats-shell.tsx, where upstream had switched githubLink back to anomalyco/opencode while this fork points at bolt-builder/bolt-cli. I kept the bolt-cli href/apiHref and took upstream's updated fallbackStars: "195K":

export const githubLink = {
  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 130f75cf was pushed to dev, so PR #266 is now closed as merged. Everything else in the sync (stats/config number updates, the $org placeholder in zen/util/handler.ts, and the two schema index removals) auto-merged cleanly.

View with [code]smith

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants