Skip to content

fix(tui): allow configuring tab title marquee speed - #58061

Closed
xzyangha wants to merge 5 commits into
anomalyco:devfrom
xzyangha:dev
Closed

xzyangha wants to merge 5 commits into
anomalyco:devfrom
xzyangha:dev

Conversation

@xzyangha

@xzyangha xzyangha commented Oct 22, 2026 •

Copy link
Copy Markdown

Issue for this PR

#58054

Type of change

  • New feature

What does this PR do?

Implements the preset interface proposed by @Dante-dan in #58054.

Makes the session tab title marquee configurable through cli.json:

{ "tabs": { "marquee": "slow" } }
Value Behavior
normal (default) Unchanged: 600 ms before the first cell, then 80 ms per cell
slow 1200 ms before the first cell, then 160 ms per cell
off Titles stay truncated and no marquee timers start

Both the horizontal strip and the vertical rail pass the resolved preset into the existing createMarquee / createTabMarquee helpers, so the current one-pass-and-reset motion is unchanged and animations still only controls the fade. The preset is read reactively, so a config reload cancels a pending or running scroll and resets the offset before the new preset applies.

Also adds a "Title scrolling" entry to the Ctrl+P settings dialog, the tabs.marquee schema plus default resolution, and the CLI config docs.

How did you verify your code works?

  • bun test in packages/tui for the marquee, config and tab rail tests: 29 pass.
  • New fake-timer cases cover normal, slow, off, and changing the preset mid-scroll.
  • The full packages/tui suite only reports failures that also reproduce on a clean checkout of dev.
  • bun turbo typecheck passes.

Screenshots / recordings

No visual change unless tabs.marquee is set.

Checklist

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

Added by the opencode bot (AI-generated).

Fixes #58054

Related: #45112, #54927

Public API: adds the tabs.marquee cli.json setting (normal | slow | off, default normal; backwards compatible)

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Oct 22, 2026

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Works as described. I ran the TUI from source on the base and on this branch with a long session title and hovered its tab. normal (and no setting) matches the base timing, slow waits about 1.2 s and scrolls at half speed, and off keeps the title truncated while the tab's hover state still works. The new "Title scrolling" entry appears in the Ctrl+P settings under Tabs. The marquee and config tests and the packages/tui type check pass.

Public API: adds the tabs.marquee key to cli.json (normal | slow | off, default normal). Backwards compatible: existing configs keep today's timing.

The code is sound. Resetting only the inner marquee when the setting changes is right, because the tab is still hovered. The one thing worth changing is the test file (see the inline comment).

Related: #45112, #54927

Before

scope.dispose()
})

test("scrolls wide-character titles that overflow", () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This test and leaves no timers running after disposal (line 190) only check behaviour that already existed: wide-title overflow comes from marqueeOverflows, and cleanup on disposal from the existing onCleanup. Neither depends on the new setting. Could you drop them so the new tests stay focused on what this PR adds (slow timing, off, and the reset when the setting changes)?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Dropped both. Wide-title overflow comes from marqueeOverflows and the disposal cleanup from the existing onCleanup, so neither covered the new setting. The added cases now cover the slow timing, off, and the reset when the preset changes; the pre-existing tests are unchanged apart from the new preset argument.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new commit removes the two tests I flagged, so the new tests now cover only what this PR adds. Nothing else changed, so my earlier check of the running TUI still applies, and the marquee and config tests pass (29).

Public API: adds the tabs.marquee key to cli.json (normal | slow | off, default normal). Backwards compatible.

No further concerns.

@xzyangha

Copy link
Copy Markdown
Author

@jlongster this one has been waiting on a maintainer for a couple of days, so a pointer may help.

It adds a tabs.marquee setting to cli.json (normal | slow | off, default normal) for the session tab title speed, which was hard-coded before. Six files: the setting and config plumbing, the TUI wiring, the two test files, and a docs entry. The bot review reports no further concerns; on the first revision it noted that two of the tests only asserted behaviour that already existed, so those were dropped and the tests now cover only what this PR adds.

check-compliance and check-standards are green, but the required checks — typecheck, unit (linux), unit (windows), e2e (linux), e2e (windows) — have not started: this is a fork PR, so they need an "Approve and run workflows" from a maintainer first. The branch is behind dev, though GitHub reports it mergeable, and dev still hard-codes the marquee timing, so there is nothing to reconcile.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This push changes no code: the contents and parent are the same as the commit I last reviewed, so my earlier result still holds. It also merges cleanly onto the current dev, which has since changed the TUI config file and the CLI config docs.

Public API: adds the tabs.marquee key to cli.json (normal | slow | off, default normal). Backwards compatible.

No further concerns.

@xzyangha

Copy link
Copy Markdown
Author

@kitlangton — you wrote most of the tab-title marquee code (#41566, #42055, #42093, #42344), so this probably needs your call more than a review pass.

It takes the hard-coded tab title speed out of session-tabs.tsx and exposes it as tabs.marquee in cli.json (normal | slow | off, default normal = today's behaviour, so nothing changes unless someone sets it). If a config key isn't wanted for this, say so and I'll close it rather than leave it in the queue — the only point was to stop the speed being fixed inside the component.

check-compliance and check-standards pass and the bot review has no open concerns; the required checks are still action_required because this is a fork PR and need an "Approve and run workflows".

A location graph is cached for its whole life and resolved its project once. Opening a folder before `git init` therefore pinned the markerless project identity, so the location kept reporting it (wrong project for session lists and the environment snapshot). Drop such a graph once a VCS marker appears and let the next borrow rebuild it.
fix(core): rebuild a location after its directory becomes a git repo
@xzyangha
xzyangha marked this pull request as draft November 3, 2026 02:05
@xzyangha
xzyangha marked this pull request as ready for review November 3, 2026 02:05
@xzyangha xzyangha closed this Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: tui: session tab title marquee is too fast to read — make it configurable

1 participant