GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(tui): restore animated Go upsell modal on free usage limit by kitlangton · Pull Request #57471 · anomalyco/opencode

Conversation

@kitlangton

@kitlangton kitlangton commented Oct 20, 2026 •
edited by opencode-agent Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Stack (merge in order):

  1. feat(core): typed free-limit error with reset time #57146 — feat(core): typed free-limit error with reset time (base dev)
  2. fix(app): restore free-tier usage limit dialog, timeline line, and prompt recall #57466 — fix(app): restore free-tier usage limit dialog, timeline line, and prompt recall (base feat(core): typed free-limit error with reset time #57146)
  3. feat(tui): show free-limit notice, recall prompt, and skip failure toast #57467 — feat(tui): show free-limit notice, recall prompt, and skip failure toast (base feat(core): typed free-limit error with reset time #57146)
  4. feat(tui): restore animated Go upsell modal on free usage limit #57471 — feat(tui): restore animated Go upsell modal on free usage limit (this PR, base feat(tui): show free-limit notice, recall prompt, and skip failure toast #57467)

▶ TUI before / after (animated Go upsell modal):

57146-tui-before-after.mp4

Head: aedd9d9f91c22245f26925dc834c0163fb2a3df6 · Size: +927/−22 (4 files)

Related: #50996, #52894

Today

In the v1 TUI (#21583, #22976), hitting the free usage limit opened an animated "Free limit reached" modal featuring a subpixel GO logo shimmer, radial background pulse, and don't show again / dismiss / subscribe actions. When packages/opencode was removed in fe0c4f8c74, that modal and its go_upsell_art renderable were not ported to packages/tui.

After

Restores v1's animated DialogGoUpsell modal on the first provider.free-limit hit in 24 hours when the composer draft is empty and "don't show again" is not set:

  • Animated art (go_upsell_art): ports v1's radial pulse rings and half-block GO logo shimmer (GoUpsellArtRenderable), holding the renderer at 30 fps while animating, rendering a static frame with live: false when config.animations === false, and switching to a compact scrollable layout with stacked actions on short or narrow terminals (44×24, 60×12).
  • Actions & gating: Subscribe opens https://opencode.ai/go and transitions into DialogIntegration (integrationID="opencode-go", autoConnect) with account sign-in ordered before API key auth; Dismiss (esc) closes for 24 hours and leaves FreeLimitNotice in the transcript; Don't show again persists dontShow: true in the go-upsell store. Eligibility is claimed atomically inside the file-locked go-upsell storage mutation and reserved synchronously in memory.
Today (dev) After (#57471)
tui-before tui-after-modal

How

  • packages/tui/src/component/go-upsell-art.ts: implement GoUpsellArtRenderable extending @opentui/core Renderable with live gated on animate, destroySelf cleanup, and subpixel GO glyph shading from logo.ts.
  • packages/tui/src/component/dialog-go-upsell.tsx: render DialogGoUpsell with don't show again, dismiss, and subscribe actions, 30 fps cap cleanup on unmount/disable, and compact layout adaptation (<52 columns or <22 rows).
  • packages/tui/src/routes/session/index.tsx: claim the 24h / dontShow gate inside updateGoUpsell's locked storage mutation (plus synchronous storage.memory reservation), revalidate session/dialog/composer state after awaiting the lock, and open DialogGoUpsell.

Proof

  • packages/tui/test/app-lifecycle.test.tsx:
    • Opens Free limit reached with the GO logo and reset time, restores composer focus on dismiss / esc, suppresses re-opening at 24h - 1ms, and re-opens at 24h.
    • Transitions from subscribe to DialogIntegration (Connect OpenCode Go with account sign-in first when OAuth is available, or key prompt / delayed catalog resolution).
    • Persists don't show again to disk across a fresh TUI restart past 48 hours, and atomically deduplicates concurrent free-limit events across two TUI instances sharing a state directory.
    • Verifies animations: true live renderable lifecycle (live, isDestroyed, 30 fps cap and restoration on close) and compact layouts at 44×24 and 60×12 (including mouse click targets).

Risk

Low. The modal only opens when provider.free-limit fires on an active session with an empty composer, no open dialog, and an unclaimed 24-hour window; dismissing or opting out always leaves the inline FreeLimitNotice intact.


Added by the opencode bot (AI-generated).

Related: #49705

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot added the contributor label Oct 20, 2026
This was referenced Oct 20, 2026
feat(core): typed free-limit error with reset time #57146
Merged
fix(app): restore free-tier usage limit dialog, timeline line, and prompt recall #57466
Merged
feat(tui): show free-limit notice, recall prompt, and skip failure toast #57467
Merged
@kitlangton
kitlangton force-pushed the free-limit-tui-notice branch from 7df6ec7 to a6142e0 Compare October 20, 2026 21:10
@kitlangton
kitlangton force-pushed the free-limit-tui-modal branch from aedd9d9 to 50417f2 Compare October 20, 2026 21:10
@kitlangton
kitlangton force-pushed the free-limit-tui-notice branch from a6142e0 to e1a4dd2 Compare October 20, 2026 21:13
@kitlangton
kitlangton force-pushed the free-limit-tui-modal branch from 50417f2 to 310196f Compare October 20, 2026 21:14
@kitlangton
kitlangton force-pushed the free-limit-tui-notice branch from e1a4dd2 to c9c33dd Compare October 20, 2026 21:38
@kitlangton
kitlangton force-pushed the free-limit-tui-modal branch from 311bb3e to 2f50866 Compare October 20, 2026 21:38
@kitlangton
kitlangton force-pushed the free-limit-tui-notice branch from c9c33dd to 086051f Compare October 20, 2026 22:13
@kitlangton
kitlangton force-pushed the free-limit-tui-modal branch from 2f50866 to deaf99d Compare October 20, 2026 22:14
Base automatically changed from free-limit-tui-notice to dev October 20, 2026 22:51
kitlangton added 2 commits October 20, 2026 15:52
@kitlangton
feat(tui): restore animated Go upsell modal on free usage limit
e417c2d
@kitlangton
perf(tui): draw Go upsell art into its own buffer without per-cell dr…
c18833b
…aw calls

The art recorded one setCell draw per cell each frame (about 7 JS objects per
cell, ~21k per frame at 100x30). It now uses a buffered renderable, writes the
cells through withBuffers, and blits once. Distances and falloff are computed
once per size, the logo glyphs and distances once per module, and a still frame
is drawn once and reused. Output is byte-identical.
@kitlangton
kitlangton force-pushed the free-limit-tui-modal branch from deaf99d to c18833b Compare October 20, 2026 22:52
@github-actions github-actions Bot mentioned this pull request Oct 20, 2026
📊 AI CLI 工具社区动态日报 2026-10-21 litang9/big_model_radar#581
Open
@kitlangton
kitlangton force-pushed the free-limit-tui-modal branch 3 times, most recently from 40aa261 to a469ac4 Compare October 21, 2026 01:21
@kitlangton
fix(tui): start OpenCode device sign-in on Go upsell subscribe
08f391b
@kitlangton
kitlangton force-pushed the free-limit-tui-modal branch from a469ac4 to 08f391b Compare October 21, 2026 01:29
@kitlangton
kitlangton marked this pull request as ready for review October 21, 2026 01:35
@kitlangton
kitlangton merged commit adcda1b into dev Oct 21, 2026
12 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@kitlangton
kitlangton deleted the free-limit-tui-modal branch October 21, 2026 01:35
opencode-agent[bot]
opencode-agent Bot reviewed Oct 21, 2026
View reviewed changes

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Works as described. I drove the TUI with the simulated model returning a FreeUsageLimitError: on dev only the inline notice appears, and with this PR the animated "Free limit reached" modal opens over it (screenshots below). The art and lifecycle tests pass, and packages/tui type-checks cleanly.

Public API: unchanged. The only new persisted state is TUI-local (a go-upsell key in TUI storage).

Worth fixing (details inline):

  • The last commit swaps DialogIntegration for a new DialogGoUpsellConnect, a copy of the integration dialog's device-OAuth connect / poll / cancel / copy / open logic. The description still says Subscribe goes into DialogIntegration (opencode-go, autoConnect).
  • The once-a-day gate keeps a memory store and a file store in sync with manual rollbacks, to deduplicate across concurrent TUI instances. That's a lot of code for a rare case.
  • The new app-lifecycle tests add about 830 lines for one modal.

Related: #49705

Before

After

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/tui/src/component/dialog-go-upsell.tsx
)
}

function DialogGoUpsellConnect(props: { canContinue?: () => boolean; onSubscribed: () => void }) {

@opencode-agent opencode-agent Bot Oct 21, 2026

Copy link
Copy Markdown
Contributor

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.

This component re-implements most of DialogIntegration's OAuth flow: connect with form defaults, poll oauth.status every 500 ms, cancel on cleanup, OAUTH_CODE copy/open keybinds and the legacy and new footers. That's about 250 lines that will drift from the real connect dialog. The previous commit used DialogIntegration with integrationID + autoConnect, and the description still says so. Could we go back to that and extend DialogIntegration with what's missing (e.g. preselecting the opencode device method and an onConnected hook that picks a Go model), instead of keeping a parallel copy?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/tui/src/routes/session/index.tsx
}
const canOpen = () =>
Boolean(hasRecalledPrompt() && dialog.stack.length === 0 && !goUpsell.dontShow && !goUpsellMemory.dontShow)
const previousSeen = goUpsellMemory.lastSeenAt

@opencode-agent opencode-agent Bot Oct 21, 2026

Copy link
Copy Markdown
Contributor

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.

This gate tracks state in both storage.memory and the locked storage.store, rolls lastSeenAt back by hand on three paths, re-checks canOpen() both inside and after the lock, and treats a storage failure as a claim. All of that exists so two TUIs sharing a state dir don't both show the modal for the same free-limit hit. That seems unlikely, and seeing the modal twice is harmless. AGENTS.md asks to agree on this kind of race-handling complexity before adding it. A single check of goUpsell.dontShow/lastSeenAt, then writing lastSeenAt and opening the dialog, would cover the real case in a few lines and remove most of the related test scaffolding.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/tui/src/routes/session/index.tsx
draft.dontShow = true
}).catch(() => undefined)
}}
onSubscribe={() => {

@opencode-agent opencode-agent Bot Oct 21, 2026

Copy link
Copy Markdown
Contributor

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.

After a successful sign-in, onSubscribe submits the restored prompt right away. The user has just come back from the browser and may not expect a message to go out on a paid Go model without confirming. Is that intended? Leaving the prompt restored in the composer, with the Go model selected, would let them send it themselves.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/tui/test/app-lifecycle.test.tsx
})

test("free usage limit does not overwrite a draft while typing", async () => {
test("free usage limit Subscribe handles mid-auth/mid-sync Escape, sync failure, already-connected accounts, and Don't show again across restart", async () => {

@opencode-agent opencode-agent Bot Oct 21, 2026

Copy link
Copy Markdown
Contributor

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.

Together these four tests are about 830 lines. This one covers Escape mid-auth, Escape mid-sync, sync failure, already-connected accounts and don't-show-again across a restart all in one test, and the two-instance test exercises the cross-process race. They're hard to follow and depend on a lot of timing. Could you cut them down to the core cases: the modal opens once per 24h and restores focus on dismiss, Subscribe hands off to the connect flow, and don't-show-again persists? The race and the mid-flight Escape variants can go, especially if the gate is simplified.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kobzevvv kobzevvv mentioned this pull request Oct 21, 2026
chore(upstream): порт v2.1.2 — 20 в порт, 26 на решение gpt-mem/opencode-mem#189
Open
12 tasks
@alwaghani alwaghani mentioned this pull request Oct 22, 2026
core: free-limit notice shows while free model requests still succeed #58103
Closed
@kobzevvv kobzevvv mentioned this pull request Oct 22, 2026
chore(upstream): порт v2.1.3 — 33 в порт, 122 на решение gpt-mem/opencode-mem#207
Open
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencode-agent opencode-agent[bot] opencode-agent[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

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.

1 participant

@kitlangton
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.