Skip to content

feat: port multi-provider UX improvements from zortos#14

Merged
aaditagrawal merged 10 commits intomainfrom
feat/zortos-ports-round2
Mar 15, 2026
Merged

feat: port multi-provider UX improvements from zortos#14
aaditagrawal merged 10 commits intomainfrom
feat/zortos-ports-round2

Conversation

@aaditagrawal
Copy link
Copy Markdown
Owner

@aaditagrawal aaditagrawal commented Mar 15, 2026

Summary

Ports high-value, provider-agnostic improvements from zortos293/t3code-copilot (commits since our last port in #10):

  • Health banner uses selected provider — Pre-session health banner now reflects the user's selected provider instead of always defaulting to "codex". Extracted resolveProviderHealthBannerProvider() helper.
  • Preserve draft provider on new thread — Creating a new thread in the same project carries over the current provider and model selection, so switching providers doesn't reset on every new chat.
  • Show previous tool calls while composing — Completed tool calls from previous turns stay visible in the timeline while composing a new message. Extracted deriveVisibleThreadWorkLogEntries().
  • Plan mode visual distinction — Composer gets amber accent when in plan mode: --ring-plan CSS token, amber focus border, "PLAN" badge pill, amber send button, and amber-tinted plan/chat toggle.

Test plan

  • Switch to a non-codex provider, verify health banner shows that provider's status before starting a session
  • Open a new thread while using a non-default provider — verify the new thread keeps the same provider/model
  • Send a message with tool calls, then start composing a new message — verify previous tool calls remain visible
  • Toggle plan mode on — verify amber border, PLAN badge, amber send button, and amber toggle label appear
  • Toggle plan mode off — verify standard blue styling returns
  • Drag a file over the composer in plan mode — verify amber dragover border

Summary by CodeRabbit

  • New Features

    • Structured issue templates for bug reports and feature requests.
    • "Scroll to bottom" pill in chat view and PLAN badge in composer.
    • Improved provider/model seeding when creating new threads; autofocus on script name input.
  • UI/UX Improvements

    • Enhanced focus-ring and plan-mode styling; tightened button overflow handling.
    • New plan-related CSS tokens.
  • Chores

    • Issue-labels synchronization workflow, Node.js engine requirement update, and IDE files added to .gitignore.

binbandit and others added 8 commits March 13, 2026 11:29
)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts:
#	apps/web/src/components/ui/sidebar.tsx
- Health banner shows selected provider status instead of hardcoding codex
- New threads preserve current provider/model selection
- Previous tool calls stay visible while composing new messages
- Plan mode gets amber visual distinction (border, badge, send button)
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 302a28a6-c2c1-46f4-a48c-840895b1ef12

📥 Commits

Reviewing files that changed from the base of the PR and between 2ef31fb and 3fbd070.

📒 Files selected for processing (1)
  • apps/server/src/persistence/NodeSqliteClient.ts

📝 Walkthrough

Walkthrough

Adds GitHub issue templates and a labels sync workflow, tightens Node engine bounds and adds a node:sqlite runtime compatibility check, and implements provider/model seeding plus several Chat UI changes (work-log derivation, plan-mode visuals, scroll-to-bottom UI).

Changes

Cohort / File(s) Summary
GitHub issue forms & labels
.github/ISSUE_TEMPLATE/bug_report.yml, .github/ISSUE_TEMPLATE/feature_request.yml, .github/workflows/issue-labels.yml
Adds structured bug/feature issue templates (validated fields: area, impact, reproduction, proposal, tradeoffs, etc.) and an idempotent GitHub Actions workflow to create/update labels (bug, enhancement, needs-triage).
Server: Node engine & sqlite runtime check
apps/server/package.json, apps/server/src/persistence/NodeSqliteClient.ts
Tightens Node engine lower bounds and adds a runtime compatibility check ensuring node:sqlite APIs (StatementSync.columns) exist before DB client initialization.
Chat view logic & UI
apps/web/src/components/ChatView.logic.ts, apps/web/src/components/ChatView.tsx
Introduces resolveProviderHealthBannerProvider and deriveVisibleThreadWorkLogEntries; switches work-log source to thread activities, adds scroll-to-bottom pill, PLAN badge/styling, and related UI wiring.
New-thread seeding & hooks
apps/web/src/hooks/useHandleNewThread.ts
Extends handleNewThread options to accept provider? and model?; seeds/persists new thread draft provider/model from explicit options, active thread, or latest draft.
UI tokens & styling
apps/web/src/components/ui/sidebar.tsx, apps/web/src/components/Sidebar.logic.ts, apps/web/src/index.css
Replaces sidebar ring token usages (ring-sidebar-ringring-ring), adds overflow-hidden to button variants, adjusts focus ring classes, and defines --color-ring-plan / --ring-plan CSS variables for plan-mode.
Minor UI / repo housekeeping
apps/web/src/components/ProjectScriptsControl.tsx, .gitignore
Adds autofocus to a script-name input; adds .idea/ to .gitignore.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant UI as "Chat UI"
  participant Hook as "useHandleNewThread"
  participant DraftStore as "Composer Draft Store"
  participant ThreadSvc as "Thread Creation / Router"

  User->>UI: click "New Thread" (provider?/model?)
  UI->>Hook: handleNewThread({ provider?, model? })
  Hook->>DraftStore: read draftsByThreadId, activeDraft
  alt explicit provider/model provided
    Hook->>DraftStore: setDraftProvider(...), setDraftModel(...)
  else provider/model from active thread or latest draft
    Hook->>DraftStore: setDraftProvider(...), setDraftModel(...)
  end
  Hook->>ThreadSvc: create new thread + navigate
  ThreadSvc->>UI: render new thread (composer seeded)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I planted templates, labels neat and bright,
I nudged node versions for the runtime's light,
Threads wake with seeded provider and plan,
Amber rings hum softly—hop, code and I, we can! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately reflects the main objective: porting multi-provider UX improvements from zortos; changes involve provider health banner, draft provider preservation, tool call visibility, and plan mode styling.
Description check ✅ Passed The PR description is comprehensive and well-structured, covering all main changes with clear explanations. It includes a detailed test plan checklist covering all major features modified.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/zortos-ports-round2
📝 Coding Plan
  • Generate coding plan for human review comments

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

@github-actions github-actions bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL 500-999 effective changed lines (test files excluded in mixed PRs). labels Mar 15, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/server/src/persistence/NodeSqliteClient.ts`:
- Around line 64-70: The runtime check in NodeSqliteClient.ts uses a loose
condition for Node 24; update the supported calculation used by the supported
constant (and any related logic around Effect.die) so it requires (major === 22
&& minor >= 16) || (major === 23 && minor >= 11) || (major === 24 && minor >=
10) || major >= 25, and change the error string passed to Effect.die (which
references process.versions.node) to read ">=22.16, >=23.11, or >=24.10" so the
guard and the message match the declared engines.node policy.

In `@apps/web/src/components/ChatView.tsx`:
- Line 265: The scroll-pill state (showScrollToBottom) can remain true after
programmatic viewport changes; update all programmatic scroll paths to call
setShowScrollToBottom(false) immediately after performing the programmatic jump
(e.g., in your thread-switch handler, any auto-scroll/auto-scroll-completion
callback, and any function that calls scrollTo/scrollIntoView or forces
stick-to-bottom) so the pill is cleared even when no scroll event fires; ensure
you place the setShowScrollToBottom(false) call alongside the existing
programmatic-scroll logic rather than relying on onScroll handlers.
- Around line 3528-3531: The ComposerPendingUserInputPanel is being given
respondingRequestIds but the responder state updated by
thread.user-input.respond is respondingUserInputRequestIds, so the panel never
sees its own submission state; update the JSX for ComposerPendingUserInputPanel
to pass the correct prop (e.g.
respondingUserInputRequestIds={respondingUserInputRequestIds}) or replace
respondingRequestIds with respondingUserInputRequestIds so the component
receives the in-flight user-input IDs and can render loading/disabled UI in sync
with the footer.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ba70fd7e-5e26-4488-950a-2173e773db6f

📥 Commits

Reviewing files that changed from the base of the PR and between 8199a51 and ec21791.

📒 Files selected for processing (13)
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/ISSUE_TEMPLATE/feature_request.yml
  • .github/workflows/issue-labels.yml
  • .gitignore
  • apps/server/package.json
  • apps/server/src/persistence/NodeSqliteClient.ts
  • apps/web/src/components/ChatView.logic.ts
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/ProjectScriptsControl.tsx
  • apps/web/src/components/Sidebar.logic.ts
  • apps/web/src/components/ui/sidebar.tsx
  • apps/web/src/hooks/useHandleNewThread.ts
  • apps/web/src/index.css

- Align node:sqlite compat guard with engines.node policy (>=24.10)
- Clear scroll-to-bottom pill on programmatic scroll jumps
- Pass respondingUserInputRequestIds to pending user input panel
@aaditagrawal aaditagrawal merged commit 38118fb into main Mar 15, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 effective changed lines (test files excluded in mixed PRs). 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.

7 participants