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
Open
Agentic UI: Improve working timer units to use more than seconds and add new transition animation#4579shaunandrews wants to merge 3 commits into
shaunandrews wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
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; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related issues
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
1m 0sand1h 0s).Review guide
9sto10stransition: the ones column should roll from 9 to 0 independently as the tens column appears.0s.Testing Instructions
0s.4sthrough12sand confirm only changed digit columns animate.59s,1m 0s,1m 1s,59m 59s, and1h 0s.Animation
The lossless 2× capture below runs from
4sthrough12s. It includes the independent9sto10sdigit transition.H.264 video version
Minute and hour boundaries
Both lossless 2× captures include the unit change and the always-present
0svalue.58s→1m 2s59m 58s→1h 2sLonger format examples
1m 20s15m 8s1h 27m 46sScreenshots
Pre-merge Checklist