refactor(ui): consolidate timed notices - #872
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR consolidates transient and session notice timing behind a reusable
Confidence Score: 5/5The PR appears safe to merge, with the existing notice durations, callers, precedence, and lifecycle behavior preserved. The shared hook cancels replaced timers, invalidates stale callbacks, cleans up on unmount, and retains separate three- and four-second channels; current callers remain compatible and the new tests exercise the relevant lifecycle transitions. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
Caller[Notice caller] --> Show[show text]
Show --> Cancel[Cancel pending channel timer]
Cancel --> Generation[Advance generation]
Generation --> Display[Update notice text]
Display --> Schedule[Schedule channel-specific timeout]
Schedule --> Check{Generation still current?}
Check -- Yes --> Clear[Clear notice text]
Check -- No --> Ignore[Ignore stale callback]
Unmount[Unmount or explicit clear] --> Invalidate[Advance generation and cancel timer]
Invalidate --> Ignore
Reviews (1): Last reviewed commit: "refactor(ui): consolidate timed notices" | Re-trigger Greptile |
benvinegar
force-pushed
the
refactor/timed-notices
branch
from
August 27, 2026 01:46
fb2843e to
0548939
Compare
benvinegar
enabled auto-merge (squash)
August 27, 2026 01:47
1 task
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.
Summary
useTimedNoticeTesting
bun test src/ui/hooks/useTimedNotice.test.tsxbun run typecheckbun run deps:checkbun run format:checkbun run lintThis PR description was generated by Pi using GPT-5.6 Sol