Skip to content

fix: preserve capital letters in group names and dismiss stale version banner#593

Merged
asheshgoplani merged 1 commit intoasheshgoplani:mainfrom
Myasir92:fix/capital-letters-and-stale-version-banner
Apr 17, 2026
Merged

fix: preserve capital letters in group names and dismiss stale version banner#593
asheshgoplani merged 1 commit intoasheshgoplani:mainfrom
Myasir92:fix/capital-letters-and-stale-version-banner

Conversation

@Myasir92
Copy link
Copy Markdown
Contributor

@Myasir92 Myasir92 commented Apr 14, 2026

Summary

Fixes #594

  • Bug 1 — Capital letters in group/session names: Removed strings.ToLower() from path generation in CreateGroup, CreateSubgroup, and RenameGroup so that group paths preserve the original casing (e.g., "MyProject" → path "MyProject" instead of "myproject").
  • Bug 2 — Stale version update banner: Added InvalidateCache() that deletes the update cache after a successful agent-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 or brew upgrade).

Files Changed

  • internal/session/groups.go — removed strings.ToLower() from 3 path-generation sites
  • internal/update/update.go — added InvalidateCache() + called it after successful update
  • internal/ui/home.go — added lastUpdateCheck field, periodic re-check tick, and banner dismissal logic
  • internal/session/groups_test.go — updated path expectations to match case-preserving behavior
  • cmd/agent-deck/group_cmd_test.go — updated path expectations to match case-preserving behavior

Test plan

  • Create a group with mixed-case name (e.g., "MyProject") — verify it displays with original casing
  • Create a subgroup with capitals — verify same
  • Rename a group to include capitals — verify same
  • Run go test ./internal/session/... — all group tests pass
  • Run go test ./cmd/agent-deck/... — all group reorder tests pass
  • Start TUI → trigger version banner → update via terminal → wait ~5 min → verify banner dismisses
  • Run go test ./internal/update/... — update tests pass

🤖 Generated with Claude Code

…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
Copy link
Copy Markdown
Owner

@asheshgoplani asheshgoplani left a comment

Choose a reason for hiding this comment

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

Reviewed end-to-end. Both bug fixes are correct. Two comments: (1) test suite health, (2) scope packaging.

What I verified

  1. Checked out the branch.
  2. Ran all group-related tests (TestCreateGroup|Subgroup|RenameGroup|MoveSessionTo|DeleteGroup|Reorder): all PASS.
  3. Ran the cmd/agent-deck group tests: PASS.
  4. Ran full internal/session: 6 test failures — all are the documented pre-existing SetEnvironment: exit status 1 flake class (memory: agent_deck_tmux_test_env.md, tests: TestSyncSessionIDsFromTmux_* + TestInstance_*). Not caused by this PR — they fail identically on main.
  5. Checked for case-sensitivity landmines: no strings.ToLower calls on GroupPath remain in groups.go; other GroupPath == 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 → call InvalidateCache() → 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.

@asheshgoplani asheshgoplani merged commit 2c2051e into asheshgoplani:main Apr 17, 2026
asheshgoplani added a commit that referenced this pull request Apr 17, 2026
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
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.

Bug: Capital letters not preserved in group/session names & stale version banner after update

2 participants