Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Visual indicator showing which SSH host a workspace is running on.

Badge displays:

  • Server rack SVG icon + hostname
  • Accent blue styling with subtle border
  • Tooltip with full SSH host string

Appears in:

  • Workspace list items (sidebar) - left of workspace name
  • Workspace title header (chat area) - between git status and project/branch

Implementation:

  • New RuntimeBadge component with SVG icon
  • extractSshHostname() utility handles various SSH host formats (hostname, user@host, host:port)
  • Uses existing runtimeConfig from WorkspaceMetadata (no new IPC)
  • Badge hidden for local workspaces
  • Comprehensive test coverage (7 tests)

Generated with cmux

Add a visual indicator showing which SSH host a workspace is running on:
- Badge displays 🖥️ icon + hostname for SSH workspaces
- Appears in workspace sidebar (left of workspace name) and title bar
- Tooltip shows full SSH host string on hover
- No badge shown for local workspaces

Implementation:
- New RuntimeBadge component with accent-colored styling
- extractSshHostname() utility handles various SSH host formats
- Uses existing runtimeConfig from WorkspaceMetadata (no new IPC)
- Comprehensive test coverage for hostname extraction

Generated with `cmux`
Move RuntimeBadge into same grid cell as workspace name to avoid
breaking the existing layout. Badge and name now share a flex container.

Generated with `cmux`
Add justify-end to flex container to restore right-alignment of
workspace name like it was before the badge was added.

Generated with `cmux`
Replace 🖥️ emoji with a clean SVG server rack icon that matches
the app's visual style. Icon uses currentColor to inherit the
accent color from the badge.

Generated with `cmux`
Display SSH runtime badge in the AIView workspace header alongside
the status indicator and git status. Badge appears between git status
and the project/branch name.

Changes:
- Add runtimeConfig prop to AIViewProps
- Pass runtimeConfig from App.tsx using workspaceMetadata
- Render RuntimeBadge in workspace title header

Generated with `cmux`
Remove RuntimeBadge from TitleBar component. Badge should only appear in:
1. Workspace list items (sidebar)
2. Workspace title header (main chat area)

The left sidebar title bar should remain minimal with just version info.

Generated with `cmux`
@ammar-agent
Copy link
Collaborator Author

The integration test failure in runtimeExecuteBash.test.ts appears to be a flaky timeout unrelated to this PR's changes:

thrown: "Exceeded timeout of 25000 ms for a test."

This PR only adds UI components for displaying SSH runtime badges and doesn't touch the bash execution code. The test should handle bash command with environment variables is timing out, which is likely a CI environment issue rather than a code change issue.

All other checks pass:
✅ Static checks (lint, typecheck, fmt)
✅ Unit tests
✅ E2E tests
✅ Storybook tests
✅ Visual regression tests

Add workspaces with SSH runtime config to App stories so the runtime
badge is visible in Storybook:

- SingleProject: feature/auth workspace on dev-server.example.com
- MultipleProjects: api-v2 on prod-server.example.com, db-migration on staging.example.com

This allows visual testing and demonstration of the runtime badge UI.

Generated with `cmux`
@ammario ammario merged commit d8180e9 into main Oct 26, 2025
13 checks passed
@ammario ammario deleted the rt-badge branch October 26, 2025 18:28
ammario pushed a commit that referenced this pull request Oct 26, 2025
**Changes:**
- Remove hostname text from badge (icon-only)
- Reduce horizontal padding from `px-1.5` to `px-1`
- Simplify tooltip to "SSH: hostname"
- Hostname still visible on hover

**Benefits:**
- Saves horizontal space in workspace lists
- Less visual clutter
- Maintains full functionality via tooltip

**Before:**
`[icon] hostname` with `px-1.5`

**After:**
`[icon]` with `px-1` and tooltip

---

**Review Note:** This PR is based on the `rt-badge` branch and will have
merge conflicts until #427 is merged. Once #427 is merged to main,
rebase this PR onto main and the conflicts will be resolved.

_Generated with `cmux`_
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