GeezerVison is showing github.com — Improve sidebar thread state accuracy by Mitch515 · Pull Request #814 · pingdotgg/t3code
Conversation
Mitch515
commented
Mar 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
What Changed
- clean up stale pending-input state so thread ordering and status derivation stop treating old user-input prompts as active blockers
- tighten sidebar thread state handling for plan and error flows
- add a thread ordering preference in settings for busy groups
Why
- the sidebar could collapse distinct thread states or keep showing stale pending-input state after the underlying thread had moved on
- thread ordering becomes less trustworthy when stale state keeps affecting sort timestamps
UI Changes
- screenshots and video are attached in the PR asset comment
Checklist
- This PR is small and focused
- I explained what changed and why
- I included before/after screenshots for any UI changes
- I included a video for animation/interaction changes, if applicable
Note
Improve sidebar thread state accuracy with status pills, ordering, and pending input suppression
- Adds
sidebarThreadOrder to app settings ('recent-activity' or 'created-at'), with a new Settings UI control and normalization via appSettings.ts
- Implements
sortSidebarThreadEntries to sort threads by recent activity (considering user messages, assistant completions, proposed plans, and pending questions) or creation time
- Updates
resolveThreadStatusPill to show 'Planning' for plan-mode running threads, rename 'Plan Ready' to 'Plan Submitted', and surface unseen errors as 'Errored'
- Extends
derivePendingUserInputs to suppress prompts for errored/closed sessions, drop prompts tied to settled turns, and clean up on provider rejection of unknown requests
- Behavioral Change: pending user input badges in both the sidebar and chat view are now hidden when the session has errored or the latest turn has settled
Macroscope summarized 17740a2.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Mar 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: f5426794-f9a2-423d-827b-c229dc4641a0
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands and usage tips.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Mar 10, 2026
|
|
@@ -873,8 +873,12 @@ export default function ChatView({ threadId }: ChatViewProps) { |
|
|
[threadActivities],
|
|
|
);
|
|
|
const pendingUserInputs = useMemo(
|
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.
🟡 Medium components/ChatView.tsx:875
pendingUserInputs is recomputed whenever activeLatestTurn or activeThread.session changes identity, which happens on every store sync. This triggers the effect at line 941 that resets the composer cursor to the end of the text, making it impossible to edit the middle of a user-input answer. Consider memoizing the context object passed to derivePendingUserInputs so the array reference stays stable across syncs.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file apps/web/src/components/ChatView.tsx around line 875:
`pendingUserInputs` is recomputed whenever `activeLatestTurn` or `activeThread.session` changes identity, which happens on every store sync. This triggers the effect at line 941 that resets the composer cursor to the end of the text, making it impossible to edit the middle of a user-input answer. Consider memoizing the context object passed to `derivePendingUserInputs` so the array reference stays stable across syncs.
Evidence trail:
apps/web/src/components/ChatView.tsx lines 875-883 (pendingUserInputs useMemo with activeThread?.session dependency), line 884 (activePendingUserInput derivation), lines 895-903 (activePendingProgress useMemo with activePendingUserInput dependency), lines 941-957 (effect that sets cursor position via setComposerCursor on line 946). apps/web/src/store.ts lines 269-279 (session object creation in syncServerReadModel showing new objects created on each sync).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Fixed in 17740a2. I stabilized the pending-user-input memo inputs so store sync identity churn does not reset the composer cursor.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
macroscopeapp[bot] reacted with eyes emoji
|
Assets for review:
Settings screenshot:

Sidebar screenshot:

|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
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.
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.
|