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): add a Scripts tab to the composer picker by jlongster · Pull Request #64956 · anomalyco/opencode

Conversation

@jlongster

@jlongster jlongster commented Nov 19, 2026 •
edited by opencodejr Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a Scripts tab to the TUI composer picker (↓) for Code Mode scripts running in the background, like the desktop activity pill (#64790).

  • createData gets a job slice: job.sync(sessionID) lists running jobs for the session tree once (experimental.job.list with descendants: true, status: "running"), relists on reconnect, and experimental.job.updated adds running jobs / drops settled ones. job.list(sessionID) returns the tree's running jobs. Desktop is not switched to it here.
  • Scripts tab shows the session's own codemode jobs: first line of the script's code (from the completed execute part with that jobID, falling back to the job title, then "Script") and elapsed time. ctrl+d cancels the job; Enter does nothing. The tab only registers while a script runs.
  • Footer reads "↓ 1 script · 2 subagents · 2 shells"; clicking opens the first non-empty tab.
  • Subagents, as on desktop: a subagent counts as active while its session runs or a running job is owned in its subtree; ctrl+d interrupts it and cancels those jobs.

Mini mode is unchanged.

How did you verify your code works?

  • bun run typecheck:tsc in packages/client and packages/tui
  • bun test test/solid-job.test.ts (new, packages/client)
  • prettier + oxlint on touched files
  • opencode-drive TUI run: a backgrounded script with two shells shows "↓ 1 script · 2 shells", the Scripts tab lists "// Build both targets" with elapsed time, ctrl+d cancels it and the tab and footer entry disappear.

Screenshots / recordings

Recorded with opencode-drive: footer, Scripts tab, after cancel.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #54221

Public API: adds job.list/sync/invalidate to @opencode/client/solid createData, job.list to the TUI plugin Data interface, and composer.script.* keybinds (backwards compatible)

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 Nov 19, 2026
@jlongster
jlongster force-pushed the tui-scripts-tab branch from 7a728b0 to 8dcacc3 Compare November 19, 2026 18:55
opencodejr[bot]
opencodejr Bot reviewed Nov 19, 2026
View reviewed changes

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

Looks sound to me. Tests and type checks pass, but I couldn't run the Scripts tab in the TUI.

How I checked: bun test test/solid-job.test.ts passes in packages/client, and typecheck:tsc passes in packages/client and packages/tui. I couldn't get the simulated model to leave a Code Mode script running in the background: execute finished in about 150ms each time, even with OPENCODE_FLAGS=full_codemode. So the tab, the footer count and ctrl+d cancel weren't exercised at runtime, and I have no before/after screenshots. Could you attach the opencode-drive recording or screenshots mentioned in the description? The job slice follows the desktop logic from #64790. The reconnect relist works because going offline clears every sync key. The subagent "active while its subtree owns a running job" rule matches desktop.

Public API: additive and backwards compatible:

  • createData() in @opencode/client/solid gains job.list(sessionID), job.sync(sessionID) and job.invalidate(sessionID).
  • New TUI keybind keys: composer.script.up, composer.script.down and composer.script.cancel.
  • No server, protocol or plugin API changes.

No blocking concerns.

Related: #54221

Sorry, something went wrong.

Uh oh!

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

All reactions
opencodejr[bot]
opencodejr Bot reviewed Nov 19, 2026
View reviewed changes

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

The new commit only reverts an unrelated formatting edit in data.ts, so the diff now has no stray changes. Behaviour doesn't change and I have no new concerns. The earlier review had no open points. The public API impact is the same as before: additive job.list/job.sync/job.invalidate on createData and new composer.script.* keybinds, all backwards compatible. The before/after screenshots or recording I asked for would still help, because I couldn't run the Scripts tab with the simulated model.

Sorry, something went wrong.

Uh oh!

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

All reactions
@jlongster
feat(tui): add a Scripts tab to the composer picker
5820f04
User decisions:
- Separate Scripts tab in the TUI composer picker
- Enter on a script does nothing
- Use a shared job slice in createData
- Only Code Mode scripts, no image or video jobs
- Leave mini mode unchanged
@jlongster
jlongster force-pushed the tui-scripts-tab branch from 8dcacc3 to a68fde5 Compare November 19, 2026 19:34
@jlongster
fix(tui): address review findings on the Scripts tab
a68fde5
User decisions:
- Fix the review findings on the TUI Scripts tab
opencodejr[bot]
opencodejr Bot reviewed Nov 19, 2026
View reviewed changes

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

The follow-up reads correctly. Tests and type checks pass in client, tui and plugin. I didn't drive the TUI again: the base now holds a Code Mode script in the foreground for 2 minutes before moving it to the background (#64957). The before/after screenshots or recording would still help.

The new commits keep a grandchild session's jobs in the list even when that session isn't loaded. They also keep job updates that arrive while the list is still loading, fetch the list again on reconnect, and clear a deleted session's jobs. Composer tabs now stay in a fixed order when Scripts comes and goes. Two smaller fixes: the subagents tab lists jobs from the root session, and the footer now reads data from the plugin context.

Public API: additive and backwards compatible:

  • createData() in @opencode/client/solid gains job.list, job.sync and job.invalidate.
  • The TUI plugin Data interface gains job.list(sessionID) (marked experimental). Plugins that only read Data are unaffected. Code that builds its own Data object needs the new field, as the footer test mocks did.
  • New TUI keybind keys: composer.script.up, composer.script.down and composer.script.cancel.

One point on the new client tests (inline): they wait using sleep-and-poll loops.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread packages/client/test/solid-job.test.ts Outdated
}))
const ids = () => root.data.job.list("ses_root").map((item) => item.id)
// Resolves the next job list once its request is in flight.
const respond = async (data: JobInfo[]) => {

@opencodejr opencodejr Bot Nov 19, 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.

These tests wait using timing: respond and the reconnect check poll with Bun.sleep(1) against a 2s wall-clock timeout, line 78 relies on Bun.sleep(0), and the last check sleeps 10ms to show no request was made. On a loaded CI box that can flake or pass for the wrong reason. Since fetch is already mocked, could it signal each request (e.g. push a resolver and resolve a waiter promise), so the test awaits the request instead of polling? The reconnect case could then await the second request and its response directly. That would also make the three tests shorter and easier to follow.

Sorry, something went wrong.

Uh oh!

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

All reactions
@jlongster
test(tui): answer the job list in the TUI test fixture
d2eb3c2
User decisions:
- Fix CI on the TUI Scripts tab PR
opencodejr[bot]
opencodejr Bot reviewed Nov 19, 2026
View reviewed changes

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

The new commit only adds a job-list stub to the TUI test fixture, so fixture-based tests get an answer for the session's new job.sync call. Nothing new to flag. The public API impact is the same as in my last review. The open point about timing-based waits in solid-job.test.ts still stands.

Sorry, something went wrong.

Uh oh!

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

All reactions
@jlongster
fix(tui): keep the requested composer tab and avoid an extra session …
4674724
…read

User decisions:
- Fix CI on the TUI Scripts tab PR
opencodejr[bot]
opencodejr Bot reviewed Nov 19, 2026
View reviewed changes

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

The new commits look right. The client tests now wait for each job-list request itself instead of polling or sleeping, and passed on four runs. The composer picker switches to a requested tab that registers late, until the user picks one; the new test covers this and passes. Type checks pass in client and tui. The public API impact is the same as in my last review. No new concerns.

Sorry, something went wrong.

Uh oh!

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

All reactions
@jlongster
jlongster merged commit b9a2dc3 into dev Nov 19, 2026
10 checks passed

Uh oh!

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

@jlongster
jlongster deleted the tui-scripts-tab branch November 19, 2026 20:24
@jlongster jlongster mentioned this pull request Nov 19, 2026
feat(tui): open the first busy tab when the picker opens with down #64972
Merged
3 of 6 tasks
@opencodejr opencodejr Bot mentioned this pull request Nov 21, 2026
tui: subagent waiting on long-running shell disappears from agent list and shell is not inspectable #65403
Closed
@BrewTestBot BrewTestBot mentioned this pull request Nov 23, 2026
opencode 2.4.0 Homebrew/homebrew-core#327368
Merged
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
opencode 2.4.0 amrkmn/homebrew-tap#1251
Closed
1 task
@github-actions github-actions Bot mentioned this pull request Nov 23, 2026
feat: opencode release v2.4.0 sprisa/opencode-server#95
Merged
@scottames-github-bot scottames-github-bot Bot mentioned this pull request Nov 27, 2026
chore(deps): update ⬆️ mise-packages scottames/dots#1181
Merged
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[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

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