fix: preserve capital letters in group names and dismiss stale version banner#593
Conversation
…n banner Group/session names with capital letters were being forced to lowercase in their paths via strings.ToLower(), causing display issues. Removed the forced lowercasing so paths now preserve the original casing. Also fixed the stale version update banner that persisted after updating agent-deck via terminal while the TUI was running. Added cache invalidation after successful updates and periodic re-checks (every 5 minutes) in the TUI to auto-dismiss the banner. Committed by Muhammad Yasr
asheshgoplani
left a comment
There was a problem hiding this comment.
Reviewed end-to-end. Both bug fixes are correct. Two comments: (1) test suite health, (2) scope packaging.
What I verified
- Checked out the branch.
- Ran all group-related tests (
TestCreateGroup|Subgroup|RenameGroup|MoveSessionTo|DeleteGroup|Reorder): all PASS. - Ran the cmd/agent-deck group tests: PASS.
- Ran full
internal/session: 6 test failures — all are the documented pre-existingSetEnvironment: exit status 1flake class (memory:agent_deck_tmux_test_env.md, tests:TestSyncSessionIDsFromTmux_*+TestInstance_*). Not caused by this PR — they fail identically onmain. - Checked for case-sensitivity landmines: no
strings.ToLowercalls onGroupPathremain ingroups.go; otherGroupPath ==comparisons in the codebase are self-consistent (comparing two groups in the same post-fix world).
Bug 1 — Capitals in group paths (removing strings.ToLower)
Correct fix for the user-visible cosmetic issue. One note:
Backward-compat observation (non-blocking)
Users with existing lowercase paths on disk (pre-fix groups stored as "myproject") will continue to display as lowercase. Newly-created groups get the original casing. That's consistent — no migration needed, no breakage — but users seeing a mix of old-cased and new-cased groups in the same install may find it cosmetically odd. Worth a release-note mention: "Group paths now preserve original casing; existing groups are unaffected."
Bug 2 — Stale version banner
The 5-min re-check + InvalidateCache() after a successful update is the right hook. Would prefer this as a separate PR (see Scope comment below), but the logic itself is fine.
Scope / packaging concern (non-blocking, style feedback)
Two unrelated bugs in one PR is harder to review, bisect, and revert. If either change introduces a regression (say, the update-cache invalidation has a race), reverting Bug 2 also reverts Bug 1 — or vice versa.
Going forward, separate PRs per independent bug class. Would make your fixes easier to land quickly.
For THIS PR, fine to ship together — neither touches overlapping code paths. Just noting for next time.
Test coverage check
- Bug 1: existing group tests updated to expect original casing — good coverage.
- Bug 2: no test added for
InvalidateCache()or the periodic re-check. Could be a follow-up regression test: create a session → trigger update banner → callInvalidateCache()→ verify cache file gone → simulate tick → verify banner clears.
Approval
LGTM on both behavior changes. They solve real user paper-cuts. Ready to merge when maintainer's happy.
Patch release bundling the 9 PRs merged today: Community fixes: - #603 mineralinis: don't recreate default group when deleting empty group - #589 aaronflorey: opencode fresh/rotated session detection - #612 DaniFdz: branch_prefix in CLI worktree commands (new --channel-like flag) - #599 nvandessel: clean up stale tmux watchers + prevent duplicate sessions - #584 jennings: preserve worktree settings when editing config - #606 Clarity-89: force-delete worktrees on session deletion - #613 mike-bot-12: restore legacy keyboard after tmux detach - #593 Myasir92: preserve capital letters in group names + dismiss stale banner Documentation: - #621 (conductor): Known Gotchas section in agent-deck skill Most notably #599 includes KillSessionsWithEnvValue which prevents the duplicate-conductor race that contributed to the 2026-04-17 session death cascade. Rebuilding the binary with this fix is the immediate mitigation until test-isolation PR #623 lands. Committed by Ashesh Goplani
Summary
Fixes #594
strings.ToLower()from path generation inCreateGroup,CreateSubgroup, andRenameGroupso that group paths preserve the original casing (e.g., "MyProject" → path "MyProject" instead of "myproject").InvalidateCache()that deletes the update cache after a successfulagent-deck update, and added a periodic re-check (every 5 minutes) in the TUI so the yellow banner auto-dismisses when the binary has been updated externally (e.g., via terminal orbrew upgrade).Files Changed
internal/session/groups.go— removedstrings.ToLower()from 3 path-generation sitesinternal/update/update.go— addedInvalidateCache()+ called it after successful updateinternal/ui/home.go— addedlastUpdateCheckfield, periodic re-check tick, and banner dismissal logicinternal/session/groups_test.go— updated path expectations to match case-preserving behaviorcmd/agent-deck/group_cmd_test.go— updated path expectations to match case-preserving behaviorTest plan
go test ./internal/session/...— all group tests passgo test ./cmd/agent-deck/...— all group reorder tests passgo test ./internal/update/...— update tests pass🤖 Generated with Claude Code