Skip to content

Sidebar status as text + detect git HEAD changes instantly - #30

Merged
lawrencecchen merged 3 commits into
mainfrom
sidebar-status-text-and-git-head-watch
Feb 9, 2026
Merged

lawrencecchen merged 3 commits into
mainfrom
sidebar-status-text-and-git-head-watch

Conversation

@lawrencecchen

Copy link
Copy Markdown
Contributor

Summary

  • Replace sidebar status pills with plain text and a show more/less toggle for cleaner sidebar layout
  • Watch .git/HEAD mtime in zsh precmd to detect branch changes from aliases (gco), tools (gh pr checkout), etc. without waiting for the 3s polling interval
  • Fix NSImage shared instance mutation in DraggableFolderNSView by copying before resizing
  • Fix set_status --tab flag being swallowed by -- stop token via new parseOptionsNoStop parser
  • Update sidebar test to cover alias-based branch switching

Test plan

  • Verify sidebar status shows as text instead of pills
  • Verify show more/less toggle works with multiple status entries
  • Switch branches via alias (e.g. gco main) and confirm sidebar updates instantly
  • Drag folder icon from sidebar and confirm correct sizing
  • Run test_sidebar_cwd_git.py on VM

- Replace sidebar status pills with plain text + show more/less toggle
  for a cleaner, more readable sidebar layout
- Watch .git/HEAD mtime in zsh precmd to detect branch changes from
  aliases (gco), tools (gh pr checkout), etc. without waiting for the
  3s polling interval
- Fix NSImage shared instance mutation in DraggableFolderNSView by
  copying before resizing to prevent layout side-effects
- Fix set_status --tab flag being swallowed by -- stop token via
  new parseOptionsNoStop parser
- Update sidebar test to cover alias-based branch switching
@vercel

vercel Bot commented Feb 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmuxterm-docs Ready Ready Preview, Comment Feb 9, 2026 10:16pm

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9cf3e9144d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1114 to +1127
private func parseOptionsNoStop(_ args: String) -> (positional: [String], options: [String: String]) {
// Like parseOptions, but continues parsing `--key` options even after a `--` token.
// Used for commands where we never want UI-facing content to accidentally include flags.
let tokens = tokenizeArgs(args)
guard !tokens.isEmpty else { return ([], [:]) }

var positional: [String] = []
var options: [String: String] = [:]
var i = 0
while i < tokens.count {
let token = tokens[i]
if token == "--" {
i += 1
continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve -- stop token for set_status values

Because parseOptionsNoStop explicitly skips the -- token and keeps parsing options afterward, set_status can no longer accept values that start with -- or contain --foo as literal text. Even when callers use -- to terminate options (e.g., set_status key -- --foo), the --foo token is still treated as an option and is dropped from the value. This is a regression from the previous behavior and makes it impossible to display CLI-flag-like strings in status text. Consider honoring -- for set_status values or limiting option parsing to known flags.

Useful? React with 👍 / 👎.

When creating notifications, include the tab's current status entries
in the notification body so users see context (e.g. git branch, ports)
alongside the notification message.
@lawrencecchen
lawrencecchen merged commit 7d6f33c into main Feb 9, 2026
4 checks passed
@lawrencecchen
lawrencecchen deleted the sidebar-status-text-and-git-head-watch branch February 9, 2026 22:18
bn-l pushed a commit to bn-l/cmux that referenced this pull request Apr 3, 2026
…ai#30)

* Sidebar status as text + detect git HEAD changes instantly

- Replace sidebar status pills with plain text + show more/less toggle
  for a cleaner, more readable sidebar layout
- Watch .git/HEAD mtime in zsh precmd to detect branch changes from
  aliases (gco), tools (gh pr checkout), etc. without waiting for the
  3s polling interval
- Fix NSImage shared instance mutation in DraggableFolderNSView by
  copying before resizing to prevent layout side-effects
- Fix set_status --tab flag being swallowed by -- stop token via
  new parseOptionsNoStop parser
- Update sidebar test to cover alias-based branch switching

* Append status text to notification body automatically

When creating notifications, include the tab's current status entries
in the notification body so users see context (e.g. git branch, ports)
alongside the notification message.

* Add screenshot to README
lawrencecchen added a commit that referenced this pull request Apr 8, 2026
Points to cc6f4c2 which includes 112 upstream commits past v1.3.1
plus cmux selectCursorCell/clearSelection APIs.
rodchristiansen referenced this pull request in rodchristiansen/cmux Sep 2, 2026
Points to cc6f4c2 which includes 112 upstream commits past v1.3.1
plus cmux selectCursorCell/clearSelection APIs.
lawrencecchen added a commit that referenced this pull request Oct 4, 2026
… fixes)

New cmux-cua-native tip after manaflow-ai/cmux-cua #30, #32 (cursor drag
fixes #23, unrestricted get_app_state #27), #25 (idle-evict guard,
capture PATH, scroll clamp, reliability journal), #28 (activity store
and activity_* socket methods the Agent Activity page reads) and #31
(automation lease reducer). The old pin e0f73880 stays an ancestor.
Fleet build e9227f3fd80f8a4ece82159d (tag nxcua-v1, aws-m4pro-4) at
9715ac3 built and bundled the helper; its binary carries the
activity_* methods.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — d7ab7b38 Deployed Feb 9, 2026 by vercel[bot]
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.

1 participant