Skip to content

Show “Awaiting Input” sidebar status and extract thread status logic#701

Merged
juliusmarminge merged 2 commits intomainfrom
t3code/sidebar-awaiting-input-status
Mar 9, 2026
Merged

Show “Awaiting Input” sidebar status and extract thread status logic#701
juliusmarminge merged 2 commits intomainfrom
t3code/sidebar-awaiting-input-status

Conversation

@juliusmarminge
Copy link
Member

@juliusmarminge juliusmarminge commented Mar 9, 2026

CleanShot 2026-03-09 at 09 33 23@2x CleanShot 2026-03-09 at 09 41 14@2x
CleanShot.2026-03-09.at.09.41.25.mp4

Summary

  • add Awaiting Input as a first-class sidebar thread status when plan mode is blocked on user responses
  • extract sidebar status resolution into Sidebar.logic.ts for clearer precedence and easier maintenance
  • add focused unit tests in Sidebar.logic.test.ts covering status priority and unseen completion behavior
  • prevent plan expand/collapse button clicks from being treated as scroll-anchor interaction triggers in ChatView

Testing

  • Added Vitest coverage for hasUnseenCompletion and resolveThreadStatusPill in apps/web/src/components/Sidebar.logic.test.ts
  • Not run: bun lint
  • Not run: bun typecheck
  • Not run: bun run test

Note

Low Risk
Low risk UI/UX logic change: updates sidebar status-pill precedence (including new “Awaiting Input”/“Plan Ready” states) and tweaks chat scroll-anchor click handling, with unit tests covering the new resolver behavior.

Overview
Sidebar thread status resolution is refactored and expanded. Status-pill logic is extracted into Sidebar.logic.ts (with new resolveThreadStatusPill/hasUnseenCompletion) and Sidebar.tsx now derives both pending approvals and pending user inputs to show an “Awaiting Input” state, plus a “Plan Ready” state when a settled plan has an associated proposed plan.

Test coverage is added via Sidebar.logic.test.ts to lock in precedence (pending approval → awaiting input → working/connecting → plan ready → completed) and unseen-completion behavior.

Chat scroll anchoring is hardened by ignoring clicks on elements within [data-scroll-anchor-ignore] (and marking the plan expand/collapse button accordingly) to avoid unintended scroll-anchor adjustments when toggling plan expansion.

Written by Cursor Bugbot for commit c30706a. This will update automatically on new commits. Configure here.

Note

Show “Awaiting Input” and “Plan Ready” thread status in the sidebar and add a click guard in ChatView.onMessagesClickCapture in ChatView.tsx

Extract thread status logic into Sidebar.logic with resolveThreadStatusPill and hasUnseenCompletion, wire derivePendingUserInputs into the sidebar, and add data-scroll-anchor-ignore handling in the chat view. Tests cover status resolution scenarios.

📍Where to Start

Start with resolveThreadStatusPill and hasUnseenCompletion in Sidebar.logic.ts, then see their usage in Sidebar.tsx.

Macroscope summarized c30706a.

- add `Sidebar.logic.ts` to centralize thread status pill resolution
- show `Awaiting Input` when plan mode is blocked on user responses
- add unit tests for unseen completion and status-priority behavior
- prevent plan collapse/expand clicks from triggering chat scroll anchoring
@github-actions github-actions bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Mar 9, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

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: e43e82ec-da34-40b9-98fc-03cee3eeb631

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:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch t3code/sidebar-awaiting-input-status

Comment @coderabbitai help to get the list of available commands and usage tips.

- add "Plan Ready" sidebar status when a plan-mode turn is settled with a proposed plan
- update sidebar logic tests to cover the new status and expanded thread inputs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant