Skip to content

fix: update cmd/ files to match current store API - #4

Merged
YamiDaisuke merged 2 commits into
mainfrom
claude/repo-build-failure-8Qw20
May 22, 2026
Merged

fix: update cmd/ files to match current store API#4
YamiDaisuke merged 2 commits into
mainfrom
claude/repo-build-failure-8Qw20

Conversation

@YamiDaisuke

Copy link
Copy Markdown
Owner

After the refactor to one-file-per-ticket with string hex IDs, the
add/delete/move/show/update commands still referenced the old API
(s.NextID, s.WriteTickets, s.WriteDeleted, int IDs). Updated all five
files to use store.NewID(), s.WriteTicket(), s.WriteDeletedTicket(),
s.DeleteTicketFile(), and string ticket IDs throughout.

https://claude.ai/code/session_01APiK9T6jW7Sgdj6ydgm9TL

claude added 2 commits May 21, 2026 23:29
After the refactor to one-file-per-ticket with string hex IDs, the
add/delete/move/show/update commands still referenced the old API
(s.NextID, s.WriteTickets, s.WriteDeleted, int IDs). Updated all five
files to use store.NewID(), s.WriteTicket(), s.WriteDeletedTicket(),
s.DeleteTicketFile(), and string ticket IDs throughout.

https://claude.ai/code/session_01APiK9T6jW7Sgdj6ydgm9TL
Confirmed bugs fixed:

- tui: add clampScroll() after handleMove confirm (rowIdx reset to 0
  but scroll offset was left stale, causing board to show wrong window)
- tui: add clampScroll() at end of deleteSelected() (scroll offset
  could exceed the shorter ticket list after deletion)
- tui: fix help overlay — "l" opens label editor, not column-right nav;
  remove it from the column-navigation shortcut hint
- tui: on Esc during status rename step 1, persist config.yaml —
  updateStatusName already rewrote ticket files but config was not
  saved, leaving disk in an inconsistent state on restart (critical)
- tui: remove dead filepath/pathHelper shim (unused since prior refactor)
- tui_test: remove dead first assignment in sendKey shift+right case
- migrate: assign new hex IDs via NewID() instead of strconv.Itoa(int)
  so migrated tickets match the git hook regex [0-9a-f]{8} and
  auto-transition on merge works correctly after migration

Tests added:
- TestNewID: expand to 200 calls, check format and uniqueness for all
- TestWriteReadDeletedTicket: round-trip for WriteDeletedTicket/ReadDeleted
- TestMigrateIfNeeded_Tickets: verifies legacy integer-ID tickets are
  migrated to 8-char hex IDs and .bak file is created

https://claude.ai/code/session_01APiK9T6jW7Sgdj6ydgm9TL
@YamiDaisuke
YamiDaisuke merged commit 8e5a6d5 into main May 22, 2026
1 check 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.

2 participants