You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.
If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!
How did you verify your code works?
Screenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist
I have tested my changes locally
I have not included unrelated changes in this PR
If you do not follow this template your PR will be automatically rejected. @codesmith-bot fix all issue and make the version amtch bolt cli and then merge in this pr
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is enabled.
Summary by CodeRabbit
Bug Fixes
Improved handling of temporary API, rate-limit, network, timeout, and streaming service errors.
Requests can now retry more reliably when providers return embedded or midstream retryable errors.
Improvements
Refreshed statistics pages with streamlined data loading, clearer visualizations, geographic breakdowns, and improved mobile chart readability.
Added font and stylesheet handling for more consistent statistics page rendering.
Release
Updated the application, SDKs, extensions, and related packages to version 1.18.14.
Adds shared patterns for HTTP, rate-limit, service, network, timeout, and resource-exhaustion errors. API response bodies can also qualify errors for retry.
We reviewed changes in 0eedde4...ebf6fc0 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
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.
The reason will be displayed to describe this comment to others. Learn more.
Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable
It is considered a best practice to avoid 'polluting' the global scope with variables that are intended to be local to the script. Global variables created from a script can produce name collisions with global variables created from another script, which will usually lead to runtime errors or unexpected behavior. It is mostly useful for browser scripts.
The reason will be displayed to describe this comment to others. Learn more.
False positive: this file is an ES module, so the function declaration is module-scoped rather than global, and top-level helper functions below the main export are the repo's documented style.
The reason will be displayed to describe this comment to others. Learn more.
Unknown property 'crossorigin' found, use 'crossOrigin' instead
React components use JSX, not HTML.
So we need to use JSX attributes and React replicate the respective HTML property/attribute while rendering.
Use of HTML property in JSX can sometimes lead to errors.
For example, class is a keyword in JavaScript (JSX is an extension of JavaScript), so it will throw an error.
However, in HTML it is a valid attribute.
Note: If you use React with Web Components, use the class attribute instead.
The reason will be displayed to describe this comment to others. Learn more.
This is SolidJS (@solidjs/start), not React; Solid JSX uses native HTML attribute names, so crossorigin is correct here and the React-specific rule does not apply.
@codesmith-bot fix all git conflitcs and make the version match bolt cli and then merge in this pr
PR #172 is already merged: you pushed the resolved merge yourself at 21:23 UTC (4f21306), and GitHub marked #172 merged 4 seconds later. Nothing left to fix.
I had independently resolved the same merge locally before noticing, and my tree is byte-for-byte identical to what's on dev now (git diff origin/dev <my-merge> is empty), so the resolution on dev is correct: every conflict was a version/branding collision (upstream had synced everything to 1.18.14), and all 31 versioned manifests plus bun.lock keep the Bolt line at 1.20.6 with the @bolt-builder/bolt-cli name, bolt binaries, and PolyForm license intact. No conflict markers remain anywhere in the tree, bun install --lockfile-only reproduces the committed bun.lock exactly, and upstream's non-conflicting work (the @ai-sdk/openai-compatible@2.0.41 patch, the session/retry.ts rework, the stats page-speed changes) came through cleanly. I deleted the redundant upstream-sync branch I had pushed.
One follow-up: nix/hashes.json on dev still holds the pre-merge fork hashes, which are stale now that dependencies moved. The nix-hashes workflow triggers on pushes to dev touching bun.lock, so it should recompute and commit them on its own; worth confirming that run went green.
Read props.data directly instead of wrapping it in a memo.
data only re-reads props.data. The wrapper adds a signal without changing behavior. Use props.data in the dependent memos, as GeoBreakdownSection in packages/stats/app/src/routes/index.tsx now does.
🤖 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/`[lab]/[model].tsx around lines 887 - 891,
Remove the redundant data memo in ModelGeoBreakdownSection and update its
dependent memos to read props.data directly, matching the existing
GeoBreakdownSection pattern. Keep the activeCountry signal and all other
behavior unchanged.
Each <circle> calls props.countryById.get(country.id) four times through entry(). Show already resolves the same value. Use the callback form so the marker reads one resolved entry.
This is a readability change only; the current code is correct.
🤖 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/index.tsx` around lines 1194 - 1217, Update the
marker rendering around the Show component so its callback receives the resolved
country entry and the nested circle uses that value directly instead of
repeatedly calling entry(). Preserve the existing conditional rendering,
active-country styling, opacity, and event-handler behavior.
geoCountryMarker returns undefined for countries whose projected bounds are 3 units or larger. The intent is to add a marker only for countries that are too small to see as a filled path. The current code reads as a rejection of large countries without stating why.
Add one short comment above the bounds check.
As per coding guidelines: "Add comments for non-obvious constraints and surprising behavior, not for obvious assignments or control flow."
🤖 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/geo-map.ts` around lines 38 - 44, Add a brief
explanatory comment immediately above the bounds check in geoCountryMarker,
clarifying that markers are only used for countries whose projected bounds are
too small to see as filled paths and that larger countries are omitted.
getStatsHomeData() loads model, provider, and geo rows and computes every home dataset. The lab route uses only home.market["2M"]. Add a market-specific accessor to avoid this work on every lab page.
🤖 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/`[lab]/index.tsx at line 67, Add a
market-specific stats accessor alongside getStatsHomeData that queries and
computes only the market dataset needed for the lab route, then update the
route’s market value to use that accessor instead of home.market["2M"]. Preserve
the existing market data shape and period selection.
🤖 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/opencode/src/session/retry.ts`:
- Around line 31-32: Update RETRYABLE_MESSAGE_PATTERNS and the retry checks that
use it so numeric codes are recognized only with HTTP/status-code context, or
are validated through statusCode, rather than matching arbitrary numbers
anywhere in error text. Preserve retry behavior for genuine 429/5xx/524
responses and add a negative test proving an unrelated value such as “max_tokens
must be 500” is not retryable.
In `@packages/stats/app/src/entry-server.tsx`:
- Around line 24-38: Update the stylesheet lookup in the server entry component
to avoid casting PageEvent.assets to Asset[]. Narrow each asset entry at runtime
before accessing tag, attrs.rel, or attrs.href, while preserving the existing
stylesheet selection and development URL behavior.
In `@packages/stats/app/src/routes/index.css`:
- Around line 95-105: Update the visually hidden selector [data-page="stats"]
[data-slot="visually-hidden"] by replacing the deprecated clip declaration with
clip-path: inset(50%); preserve the remaining accessibility-hiding styles
unchanged.
In `@packages/stats/app/src/routes/index.tsx`:
- Around line 80-94: Make model-catalog loading optional across all three server
queries: in packages/stats/app/src/routes/index.tsx lines 80-94, catch
loadModelCatalog failures and pass null to priceTokenCostFromCatalog; in
packages/stats/app/src/routes/[lab]/[model].tsx lines 59-77, use an optional
catalog while preserving the labParam/modelParam fallbacks so getStatsModelData
still runs; in packages/stats/app/src/routes/[lab]/index.tsx lines 55-70, use an
optional catalog and return lab: null and labs: [] when unavailable while still
returning the market slice from getStatsHomeData.
---
Nitpick comments:
In `@packages/stats/app/src/routes/`[lab]/[model].tsx:
- Around line 887-891: Remove the redundant data memo in
ModelGeoBreakdownSection and update its dependent memos to read props.data
directly, matching the existing GeoBreakdownSection pattern. Keep the
activeCountry signal and all other behavior unchanged.
In `@packages/stats/app/src/routes/`[lab]/index.tsx:
- Line 67: Add a market-specific stats accessor alongside getStatsHomeData that
queries and computes only the market dataset needed for the lab route, then
update the route’s market value to use that accessor instead of
home.market["2M"]. Preserve the existing market data shape and period selection.
In `@packages/stats/app/src/routes/geo-map.ts`:
- Around line 38-44: Add a brief explanatory comment immediately above the
bounds check in geoCountryMarker, clarifying that markers are only used for
countries whose projected bounds are too small to see as filled paths and that
larger countries are omitted.
In `@packages/stats/app/src/routes/index.tsx`:
- Around line 1194-1217: Update the marker rendering around the Show component
so its callback receives the resolved country entry and the nested circle uses
that value directly instead of repeatedly calling entry(). Preserve the existing
conditional rendering, active-country styling, opacity, and event-handler
behavior.
🪄 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: a0a225ed-e837-45a9-b3c7-060afed7529f
📥 Commits
Reviewing files that changed from the base of the PR and between 0eedde4 and ebf6fc0.
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Require status-code context for numeric matching.
/429|500|502|503|504|524/ matches numeric values anywhere in an error string. An error such as "max_tokens must be 500" becomes retryable at Line 145, and an API error body with the same text passes the gate at Line 88. The retry policy then repeats a request that cannot succeed.
Match numeric codes only when they have HTTP or status-code context, or rely on statusCode. Add a negative test for an unrelated numeric value.
Proposed regression test
+ test("does not retry arbitrary numeric values", () => {+ expect(SessionRetry.retryable(wrap("max_tokens must be 500"), retryProvider)).toBeUndefined()+ })
Also applies to: 84-90, 145-151
🤖 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/opencode/src/session/retry.ts` around lines 31 - 32, Update
RETRYABLE_MESSAGE_PATTERNS and the retry checks that use it so numeric codes are
recognized only with HTTP/status-code context, or are validated through
statusCode, rather than matching arbitrary numbers anywhere in error text.
Preserve retry behavior for genuine 429/5xx/524 responses and add a negative
test proving an unrelated value such as “max_tokens must be 500” is not
retryable.
@solidjs/start PageEvent assets Asset StartServer document assets type
💡 Result:
In SolidStart, PageEvent is the server-side context object associated with each request [1][2][3]. The StartServer component uses this PageEvent to manage and render application assets within the document [1][4]. Key concepts regarding assets and PageEvent include: PageEvent: The PageEvent serves as the request context in SolidStart [2][3]. It contains server-side state, including assets collected during the server-side rendering process [4][5]. Assets Management: The PageEvent includes an assets property (an array of Asset objects) that tracks resources like CSS or JS files required by the components being rendered [4][5]. The useAssets hook is used within the rendering cycle to register these assets, ensuring they are injected into the final HTML [1][4][5]. Inside the StartServer component, useAssets(context.assets, nonce) is called to process these assets before they are passed to the document template [4]. Document Assets: When defining the entry-server.tsx file, you provide a Document component to StartServer [1][2]. This component receives an assets prop, which contains the gathered JSX elements (e.g., or <style> tags) to be placed in the document head [1][2]. The typical implementation of the Document component looks like this: function Document(props) { return ( {props.assets}
{props.children}
{props.scripts} ); } The Asset type represents individual resource entities collected by the system, often characterized by their HTML tag, attributes (such as href or rel), and other metadata used to manage de-duplication and loading [5]. During rendering, the system builds a registry of these assets to prevent duplicate injections and handle their lifecycles (e.g., cleaning up styles when a component unmounts) [5].
Replace the unchecked PageEvent.assets cast. In the pinned version, PageEvent.assets is declared as any[], not Asset[]. Narrow each entry before reading tag and attrs.
🤖 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/entry-server.tsx` around lines 24 - 38, Update the
stylesheet lookup in the server entry component to avoid casting
PageEvent.assets to Asset[]. Narrow each asset entry at runtime before accessing
tag, attrs.rel, or attrs.href, while preserving the existing stylesheet
selection and development URL behavior.
Replace the deprecated clip declaration with clip-path.
Stylelint reports clip as deprecated at line 102. clip applies only to absolutely positioned elements and is removed from current CSS. clip-path: inset(50%) produces the same visual hiding and keeps the content available to assistive technology.
‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
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/index.css` around lines 95 - 105, Update the
visually hidden selector [data-page="stats"] [data-slot="visually-hidden"] by
replacing the deprecated clip declaration with clip-path: inset(50%); preserve
the remaining accessibility-hiding styles unchanged.
The model catalog is now a hard dependency of every stats page query. All three server queries await loadModelCatalog(), which performs three external HTTP fetches (packages/stats/app/src/routes/model-catalog.ts lines 59-66). Any one rejection now rejects the whole page query, so a catalog outage renders no statistics at all. Before this change, catalog loading was a separate resource and a failure degraded only catalog-derived values.
packages/stats/app/src/routes/index.tsx#L80-L94: resolve the catalog as optional, for example loadModelCatalog().catch(() => null), and pass the result to priceTokenCostFromCatalog, which already handles null by returning the unpriced data.
packages/stats/app/src/routes/[lab]/[model].tsx#L59-L77: resolve the catalog as optional and keep the existing labParam/modelParam fallbacks for lab and model, so getStatsModelData still runs when the catalog is unavailable.
packages/stats/app/src/routes/[lab]/index.tsx#L55-L70: resolve the catalog as optional; when it is null, return lab: null and labs: [] and still return the market slice from getStatsHomeData.
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/index.tsx` around lines 80 - 94, Make
model-catalog loading optional across all three server queries: in
packages/stats/app/src/routes/index.tsx lines 80-94, catch loadModelCatalog
failures and pass null to priceTokenCostFromCatalog; in
packages/stats/app/src/routes/[lab]/[model].tsx lines 59-77, use an optional
catalog while preserving the labParam/modelParam fallbacks so getStatsModelData
still runs; in packages/stats/app/src/routes/[lab]/index.tsx lines 55-70, use an
optional catalog and return lab: null and labs: [] when unavailable while still
returning the market slice from getStatsHomeData.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #
Type of change
What does this PR do?
Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.
If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!
How did you verify your code works?
Screenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist
If you do not follow this template your PR will be automatically rejected.
@codesmith-bot fix all issue and make the version amtch bolt cli and then merge in this pr
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is enabled.Summary by CodeRabbit
Bug Fixes
Improvements
Release