GeezerVison is showing github.com — feat(data): feature breakout launches in new models by adamdotdevin · Pull Request #65884 · anomalyco/opencode
Conversation
Issue for this PR
None. This is a design change to the public data page.
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
Replaces the New Models table on /data with one featured launch. A model qualifies when it is under 30 days old and reaches 10% of daily tokens on a complete day. The model with the highest peak is featured. If none qualifies, the section is hidden.
Every stat on the card comes from the model's peak day, so it stays accurate if usage falls later. Daily share and rank are calculated on the server from the same Go and Free rows as the page's other charts. "Free on OpenCode" shows only while the catalog lists a non-deprecated $0 OpenCode offering.
Bars are gray at rest with the peak day brightest, and take the model's Top Models color on hover or keyboard focus.
How did you verify your code works?
- Ran the touched unit tests in
packages/data/app and packages/data/core, and typechecked both packages.
- Rendered the page from a snapshot of live data at 390 to 1920px in dark and light, covering 1, 2 and 3 day launches, a long decline, no breakout, hover, keyboard focus and touch.
- Not run against the production database. The final commit was not rendered in Safari.
Screenshots / recordings
Before
After (bars take the model's color on hover)
Visual
<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" fill="currentColor"><style>.b{transform-box:fill-box;transform-origin:bottom;animation:g 3.6s ease-out infinite}.b:nth-child(2){animation-delay:.08s}.b:nth-child(3){animation-delay:.16s}.b:nth-child(4){animation-delay:.24s}.b:nth-child(5){animation-delay:.32s}.b:nth-child(6){animation-delay:.4s}.p{animation-delay:.48s}@keyframes g{0%{transform:scaleY(.12)}40%,100%{transform:scaleY(1)}}@media (prefers-reduced-motion:reduce){.b{animation:none}}</style><g opacity=".35"><rect class="b" x="48" y="56" width="16" height="8"/><rect class="b" x="70" y="40" width="16" height="24"/><rect class="b" x="92" y="34" width="16" height="30"/><rect class="b" x="114" y="29" width="16" height="35"/><rect class="b" x="136" y="21" width="16" height="43"/><rect class="b" x="158" y="14" width="16" height="50"/></g><rect class="b p" x="180" y="12" width="16" height="52" opacity=".9"/></svg>
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sound. I read the diff and ran the touched tests in packages/data/app and packages/data/core (all pass). tsc --noEmit is clean in both packages. I couldn't render /data because the dev server needs the database variables, so the visual side is unverified here. Could you attach the before/after screenshots to the PR itself, since the share link isn't viewable from here?
The logic holds up. Every candidate's daily ends on the same latest, partial day, so it is correct for selectBreakout to drop the last entry. Share and rank come from the same Go and Free rows (productRows) as the other charts. Peak-day stats use the peak entry itself, so they stay put after usage falls. The free check skips deprecated $0 listings and providers other than OpenCode. Nothing else on the site links to #new-models, so hiding the section when no model qualifies breaks no links.
Public API: unchanged. Everything here is internal to the packages/data site.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|