Skip to content

feat(branding): own the psmux status-left and sweep pre-rename "md" leftovers - #118

Merged
AminDhouib merged 1 commit into
mainfrom
feat/status-left-branding
Jul 31, 2026
Merged

feat(branding): own the psmux status-left and sweep pre-rename "md" leftovers#118
AminDhouib merged 1 commit into
mainfrom
feat/status-left-branding

Conversation

@AminDhouib

Copy link
Copy Markdown
Member

Why

Every magent window advertised md in the left corner of its psmux status bar — the last loud piece of pre-rename branding a user actually looks at all day. That text was never magent's: it came from a personal ~/.tmux.conf (status-left '#[bold,fg=#a6e3a1] md #[default]' + status-left-length 5), which psmux loads at server start. A personal file can't be the product's branding, and it isn't editable from here.

magent has owned per-session status-bar decoration since v3.4.0, so the brand goes through the same door the F1/F2 hints already use.

What

1. Product-owned status-left. psmux.decoration_argv gains two argvs:

set -g status-left '#[bold,fg=green] magent #[default]'
set -g status-left-length 10

The length is load-bearing, not decoration: the personal conf sets status-left-length 5, which truncates magent to magen. Setting the brand without the length ships a visibly broken word. Verified live on a throwaway -L mgszbrand socket (created, status-left-length 5 set first to simulate the personal conf, then the two decoration commands; show -g reported 10 and the full brand string; server killed afterward). The user's live sessions and ~/.tmux.conf were not touched.

Both ride the single decoration_argv list, so the creation batch (platform/windows.py), up interactive, up --json, and attach pick them up with zero call-site changes — pinned by a new test_created_session_is_branded in test_platform_contract.py (the creation batch, which is the call site furthest from decorate_session).

2. Repo-wide user-visible "md" sweep. The mobile upload PWA was still branded "md upload" end to end — the rename had reached the manifest name ("magent upload") but nothing else.

Sweep inventory

Renamed (user-visible branding)

Where Was Now
psmux status bar, every session md (from personal tmux.conf) magent (product-owned)
upload page <title> md upload magent upload
upload page logotype <h1> MD magent
apple-mobile-web-app-title md upload magent upload
manifest short_name md upload magent
install-banner copy Install <b>md upload</b>… Install <b>magent upload</b>…
iOS Web Clip Label / PayloadDisplayName / PayloadDescription (x5) md upload magent upload
downloaded profile filename md-upload.mobileconfig magent-upload.mobileconfig
localStorage key md-install-hide magent-install-hide
service-worker cache key md-v1 magent-v1
attention.md_windows_by_name md_ prefix magent_windows_by_name
cli/watch.py docstring "md-grammar match" "magent-grammar match"
scripts/lint_rules.py::_starts_md _md suffix _starts_title_prefix
README psmux section hints only documents the brand + the tmux.conf-override property

Two follow-ons the renames forced, both deliberate:

  • SW cache cleanup. Renaming C would orphan the old md-v1 cache on already-installed clients, so activate now deletes every cache but the current one (standard PWA boilerplate; also makes any future version bump self-clean). Failure-swallowed like the rest of the SW.
  • md-install-hidemagent-install-hide resets the "I dismissed the install banner" flag once per existing mobile client. One extra dismissible banner; judged worth it over leaving dead branding in shipped storage.

Deliberately left

Left alone Why
MDTEST_* env vars (MDTEST_SSH_*, MDTEST_BROWSER, MDTEST_SOAK, MDTEST_MONITOR_LAB, MDTEST_INTERACTION, MDTEST_WT_COLD, MDTEST_TAILSCALE, MDTEST_ALLOW_REAL_HOME) Test-tier gate contract, documented as such in CLAUDE.md. Renaming means touching workflow YAML + every gate site for zero user-visible benefit.
mdssh CI alias Same — provisioned by .github/actions/setup-ssh-server into the runner's real ~/.ssh/config.
MD001MD005 custom lint rule IDs Rule-ID interface contract (MD002_ALLOW / md003_allowed allow-list keys, gate output, CLAUDE.md). Only the private helper _starts_md was renamed.
Test fixture name prefixes (mdrl-, mddist-, mdml-, mdhk, mdatt, mdssh*, mdtailnet, mddr-) Throwaway unique-per-run session/window names inside CI tiers; never rendered to a user. Pure churn.
Local md = home / ".magent" path variables in e2e tests Local variable names in test bodies; not branding.
.md file extensions, DESIGN.md / CLAUDE.md / E6.md / E9.md doc references Obviously not branding.
platform/macos.py's mdfind The actual macOS Spotlight binary.
CHANGELOG.md, pyproject.toml Out of scope per brief.

The sweep introduces no occurrence of the pre-rename product name anywhere; the only surviving mention in the repo remains the CHANGELOG 2.0.0 rename line, as required.

Tests

  • test_psmux.py::TestDecorateSession — the existing argv-shape pins were extended deliberately: two new exact-argv pins (status-left, status-left-length), a magent-survives-a-restyle pin mirroring the existing F1/F2 one, a _STATUS_BRAND_LEN >= len(" magent ") relationship pin (so the number can't drift away from the text it protects), and the swallow-the-exception test's count moved 2 → 4.
  • test_platform_contract.py::test_created_session_is_branded — new; proves the creation batch inherits the brand with no call-site change.
  • test_upload_browser.py — the three real-Chromium to_have_title assertions updated in the same commit (CI-only browser tier).

Gate

uv run python scripts/check.pyGATE PASSED (FULL), exit 0. 949 passed, 2 skipped, coverage 76.03% (floor 52%).

…eftovers

Every magent window showed ` md ` in its psmux status bar -- inherited from a
personal ~/.tmux.conf, not something the product set. magent already owns the
status-right hints per session, so the brand goes through the same door:
decoration_argv gains `set -g status-left '#[bold,fg=green] magent #[default]'`
plus `set -g status-left-length 10`. The length is load-bearing, not decoration:
a personal conf with `status-left-length 5` truncates ' magent ' to 'magen'
unless magent overrides it. Both ride the single decoration_argv list, so the
creation batch, `up`, `up --json` and attach pick them up with no call-site
change.

Then the wider sweep for pre-rename "md" text on user-visible surfaces: the
mobile upload PWA was still titled "md upload" end to end (page <title>, the
"MD" logotype, the apple-mobile-web-app-title, the manifest short_name, the
iOS Web Clip profile labels, the downloaded .mobileconfig filename, and the
install-banner copy). Renaming the service-worker cache key came with the
standard old-cache cleanup on activate, so the rename cannot orphan storage on
an already-installed client.
@AminDhouib
AminDhouib merged commit 470d991 into main Jul 31, 2026
29 checks passed
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