Skip to content

Agentic UI: Improve working timer units to use more than seconds and add new transition animation - #4579

Open
shaunandrews wants to merge 3 commits into
trunkfrom
improve-agent-counter
Open

Agentic UI: Improve working timer units to use more than seconds and add new transition animation#4579
shaunandrews wants to merge 3 commits into
trunkfrom
improve-agent-counter

Conversation

@shaunandrews

@shaunandrews shaunandrews commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Related issues

  • None

How AI was used in this PR

AI helped prototype several motion treatments, implement the selected per-digit reel, add formatter coverage, verify the production UI in light, dark, and RTL layouts, and capture the review media. The resulting code and media were reviewed during implementation.

Proposed Changes

  • Make the Studio Code elapsed timer easier to scan with compact hour, minute, and second units, while always retaining seconds (for example, 1m 0s and 1h 0s).
  • Animate only the digit columns that change using a short upward reel, keeping unchanged digits and unit labels stationary.
  • Size the digit viewport to the status line-height so resting and moving numerals are not clipped.
  • Preserve a stable, complete value for assistive technology, retain left-to-right timer ordering in RTL layouts, and respect reduced-motion preferences.

Review guide

  • Focus on whether the per-second reel feels subtle enough for a continuously visible status indicator.
  • Watch the 9s to 10s transition: the ones column should roll from 9 to 0 independently as the tens column appears.
  • Check minute and hour boundaries to confirm seconds remain visible as 0s.

Testing Instructions

  1. Start a Studio Code session and confirm the timer is visible immediately as 0s.
  2. Observe the timer from 4s through 12s and confirm only changed digit columns animate.
  3. Confirm the tops and bottoms of every numeral remain visible before, during, and after each transition.
  4. Confirm boundary values render as 59s, 1m 0s, 1m 1s, 59m 59s, and 1h 0s.
  5. Verify the indicator remains legible in both light and dark themes.
  6. Verify an RTL locale keeps the elapsed value in hour-minute-second order.
  7. Enable reduced motion and confirm the digit changes occur without the reel animation.

Animation

The lossless 2× capture below runs from 4s through 12s. It includes the independent 9s to 10s digit transition.

Lossless Retina elapsed counter animation from 4 seconds through 12 seconds

H.264 video version

Minute and hour boundaries

Both lossless 2× captures include the unit change and the always-present 0s value.

Minute boundary: 58s1m 2s Hour boundary: 59m 58s1h 2s
Elapsed counter crossing from seconds into one minute Elapsed counter crossing from minutes into one hour

Longer format examples

1m 20s 15m 8s 1h 27m 46s
Elapsed counter showing one minute and twenty seconds Elapsed counter showing fifteen minutes and eight seconds Elapsed counter showing one hour, twenty-seven minutes, and forty-six seconds

Screenshots

Light Dark
Unclipped elapsed counter in light theme at 2x resolution Unclipped elapsed counter in dark theme at 2x resolution

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
  • Have you linted your changes?
  • Have you added or updated tests for your changes?
  • Have you tested your changes in both light and dark mode?
  • Have you updated the documentation, if applicable?

@shaunandrews shaunandrews changed the title Show human-readable Studio Code elapsed time Agentic UI: Improve working timer units to use more than seconds Aug 18, 2026
@shaunandrews
shaunandrews marked this pull request as ready for review August 18, 2026 02:00
@shaunandrews
shaunandrews requested a lite review from Copilot August 18, 2026 02:00

Copilot AI 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.

Pull request overview

Updates the UI Classic “ThinkingIndicator” elapsed timer to display compact hour/minute/second units (while always keeping seconds visible) and adds per-digit reel animation + accessibility support for RTL and assistive technology.

Changes:

  • Added elapsed time formatting utilities (getElapsedTimeParts, formatElapsedTime) and a digit-by-digit animated renderer for the timer.
  • Updated styling to support per-digit reel transitions, fixed digit viewport sizing, and reduced-motion behavior.
  • Added unit tests covering elapsed time formatting.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
apps/ui/src/ui-classic/components/session-view/thinking-indicator/style.module.css Adds layout + per-digit reel animation styles and reduced-motion handling for the new timer UI.
apps/ui/src/ui-classic/components/session-view/thinking-indicator/index.tsx Replaces the simple seconds counter with a formatted (h/m/s) timer and per-digit animation + VisuallyHidden AT label + RTL ordering control.
apps/ui/src/ui-classic/components/session-view/thinking-indicator/index.test.ts Adds formatter unit tests for the new elapsed time string formatting.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +11 to +15
export function getElapsedTimeParts( elapsedSeconds: number ): ElapsedTimePart[] {
const hours = Math.floor( elapsedSeconds / 3600 );
const minutes = Math.floor( ( elapsedSeconds % 3600 ) / 60 );
const seconds = elapsedSeconds % 60;

Comment on lines +5 to +14
it.each( [
[ 0, '0s' ],
[ 1, '1s' ],
[ 60, '1m 0s' ],
[ 80, '1m 20s' ],
[ 908, '15m 8s' ],
[ 3600, '1h 0s' ],
[ 5266, '1h 27m 46s' ],
[ 3601, '1h 1s' ],
] )( 'formats %i seconds as %s', ( seconds, expected ) => {
Comment on lines +60 to +63
<span className={ styles.elapsed } dir="ltr">
<VisuallyHidden as="span">{ label }</VisuallyHidden>
<span className={ styles.elapsedContent } aria-hidden="true">
{ parts.map( ( { unit, value } ) => {
Comment on lines +137 to +142
@media (prefers-reduced-motion: reduce) {
.digitOutgoing,
.digitIncoming {
animation-duration: 0.01ms;
}
}
@shaunandrews shaunandrews changed the title Agentic UI: Improve working timer units to use more than seconds Agentic UI: Improve working timer units to use more than seconds and add new transition animation Aug 18, 2026
@shaunandrews
shaunandrews requested a review from a team August 18, 2026 18:15
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.

2 participants