Skip to content

feat(sidebar-v2): add task tabs and context forks#4458

Draft
t3dotgg wants to merge 3 commits into
mainfrom
t3code/task-tabs-context-fork
Draft

feat(sidebar-v2): add task tabs and context forks#4458
t3dotgg wants to merge 3 commits into
mainfrom
t3code/task-tabs-context-fork

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Jul 24, 2026

Copy link
Copy Markdown
Member

What changed

  • Reframes Sidebar v2 thread rows as workspace tasks, grouping sibling provider threads under a durable workspaceTaskId.
  • Adds an in-task tab strip with Cmd/Ctrl+T fresh-tab creation, a web-visible add button, provider/model selection per tab, context-fork creation, status indicators, and safe tab close behavior.
  • Keeps every tab in a task on the same project/worktree while allowing a different provider harness.
  • Adds a bounded, provider-neutral context handoff for the child tab's first turn without copying that handoff into the visible child transcript.
  • Makes settle, snooze, unread, rename, and delete behavior task-aware in Sidebar v2.
  • Adds migration 035, projection persistence, server capability negotiation, and one-task/one-tab backfill behavior for legacy threads.
  • Includes the original HTML implementation plan at .plans/task-tabs-context-fork.html.

Why

The current sidebar treats each agent conversation as an independent unit even when several agents are working toward one outcome. This experiment makes the worktree-backed task the durable unit while preserving threads as independently configurable execution tabs.

Older servers and legacy rows retain the existing one-thread behavior. The client only exposes task-tab creation when the server advertises support.

Validation

  • vp run -F @t3tools/contracts -F @t3tools/shared -F t3 -F @t3tools/web --parallel typecheck
  • Targeted lint and formatting across all changed TypeScript files
  • 251 focused tests across contracts, migrations, projections, command invariants, provider handoff, composer persistence, keybindings, and workspace-task grouping
  • Isolated authenticated browser pass:
    • enabled Sidebar v2
    • created and closed a fresh draft tab
    • materialized a main task with a real provider turn
    • forked that context into a second live provider tab
    • verified the shared-tree running state and sidebar tab count
    • received the forked response
    • closed the persisted child tab and returned to Main
    • confirmed both projection rows shared a task/branch and the child retained portable-fork provenance plus a durable close timestamp

Note

Add workspace task tabs and context forks to sidebar and chat view

  • Introduces a WorkspaceTaskId concept that groups related threads (tabs) into a single task; the sidebar now groups, displays, and operates on threads at the task level (snooze, settle, delete, etc. apply to all tabs)
  • Adds a WorkspaceTaskTabs tab bar in the chat view for navigating between tabs, creating fresh tabs, and forking context into a new tab (portable fork)
  • Portable context forks synthesize a size-bounded transcript from the source thread and prepend it to the first provider turn in the new tab via buildPortableForkProviderInput
  • Adds database migration 035 to add workspace_task_id, tab_position, tab_closed_at, and fork_provenance_json columns to projection_threads, with backfill for legacy rows
  • Extends orchestration contracts, decider invariants, projector, and projection queries to carry and enforce tab/task metadata and fork provenance throughout the event pipeline
  • Risk: listActiveThreadRows now excludes threads with tab_closed_at IS NOT NULL; any caller expecting closed tabs in active listings will silently receive fewer results
📊 Macroscope summarized 0ed495a. 25 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted

🗂️ Filtered Issues

No issues evaluated.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

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 Plus

Run ID: 9e0d5cf0-9466-4448-8522-b8b36ffc05d6

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
  • Commit unit tests in branch t3code/task-tabs-context-fork

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.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Jul 24, 2026
Comment thread apps/server/src/orchestration/decider.ts
Comment thread apps/web/src/hooks/useWorkspaceTaskTabs.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). 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