fix: update cmd/ files to match current store API - #4
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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