Skip to content

Conversation

@vanpelt
Copy link
Collaborator

@vanpelt vanpelt commented Aug 6, 2025

Summary

Introduced a new workspace-centric view to the TUI that provides a dedicated environment for working with individual project workspaces. This replaces the previous ports-focused overview with a more comprehensive workspace management system.

Key Changes

  • New Workspace View: Added a split-screen layout with 75% width for dual terminals (Claude agent terminal and regular terminal) and 25% for a sidebar showing git status, changed files, and active ports
  • Workspace Selector: Implemented Ctrl+W modal for selecting between workspaces, similar to the existing port selector pattern
  • Overview Refactor: Replaced the ports section with a workspace list showing branch, active status, and change count. Ports are now shown in a condensed format
  • Terminal Management: Extended the existing shell session system to support multiple terminals per workspace, with the Claude terminal automatically connecting with ?agent=claude parameter

Implementation Notes

The workspace view follows the existing TUI architecture patterns, implementing the standard View interface and integrating with the current message handling system. Mock workspace data is currently provided for development, with the structure ready for API integration.

@codecov
Copy link

codecov bot commented Aug 6, 2025

Codecov Report

❌ Patch coverage is 0% with 701 lines in your changes missing coverage. Please review.
✅ Project coverage is 10.77%. Comparing base (a3f48fd) to head (773d84c).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
container/internal/tui/view_workspace.go 0.00% 406 Missing ⚠️
container/internal/tui/update.go 0.00% 114 Missing ⚠️
container/internal/tui/app.go 0.00% 54 Missing ⚠️
container/internal/tui/view_overview.go 0.00% 51 Missing ⚠️
container/internal/tui/commands.go 0.00% 47 Missing ⚠️
container/internal/services/commit_sync.go 0.00% 15 Missing ⚠️
container/internal/tui/pty_client.go 0.00% 6 Missing ⚠️
container/internal/tui/sse_client.go 0.00% 5 Missing ⚠️
container/internal/tui/model.go 0.00% 2 Missing ⚠️
container/internal/tui/components/keys.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #110      +/-   ##
==========================================
- Coverage   11.16%   10.77%   -0.40%     
==========================================
  Files          74       75       +1     
  Lines       18484    19159     +675     
==========================================
  Hits         2064     2064              
- Misses      16215    16890     +675     
  Partials      205      205              
Flag Coverage Δ
unittests 10.77% <0.00%> (-0.40%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

vanpelt and others added 17 commits August 6, 2025 21:24
Fix TUI workspace list to update in real-time via SSE events
The sync mechanism was failing because it was checking for branch existence
and updating branches in the worktree path instead of the main repository.
Since worktrees use custom refs (refs/catnip/*), they don't have access to
regular branches like 'fix/tui-workspace-live-updates'.

Key changes:
- syncToNiceBranch: Check branch existence in main repo, not worktree
- syncToNiceBranch: Update branches in main repo, not worktree
- hasUnsyncedNiceBranch: Check branch existence and get hashes from main repo
- Remove duplicate findRepositoryForWorktree call in syncToNiceBranch

This resolves the "No commits between feature/tui-workspace-view and
fix/tui-workspace-live-updates" error when creating PRs, as the nice
branches are now properly kept in sync with their custom refs.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Move JSON filtering from view layer to PTY client WebSocket handling
- Separate text (JSON control) and binary (PTY output) message processing
- Fix sidebar width to use fixed columns (20-30) instead of percentage
- Remove unused JSON filtering code from workspace view
- Simplify terminal output processing at view layer
- Add terminal emulator support for proper ANSI handling
- Remove unused functions and fix lint issues

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants