Close the undo gaps, index treasure in search, and polish the ledgers - #272
Merged
Conversation
A sweep of small consistency improvements across the panels: - Every destructive shared-state action now offers an Undo toast: removing a journal entry, removing a hero (a whole character sheet), removing a combatant, and ending an encounter (which wipes all HP and conditions) can all be reverted with one tap. The Treasure "−" button no longer silently deletes an item at quantity zero — it goes through the same undo path, preserving notes and holder. - The global finder (Ctrl+K) now indexes Treasure items too, searching name, notes and holder, so @mentions of items resolve as well. - Keywords gain the same inline editing every other text ledger already has — fixing a typo no longer means delete and re-add. - Underscore emphasis in the Markdown formatter is word-boundary only, so identifiers like cellar_door_key no longer sprout spurious italics. - The eleven per-panel copies of the uid() helper collapse into one shared makeUid() utility. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BJmJivTGUXgxU8S5RcYAxz
Two follow-ups to the ledger polish: - The Session Journal — the longest-growing list in the app — gains the same quick text filter the keywords list has, matching entry text and author, shown once more than three entries exist. - useGameChannel no longer applies a peer's broadcast while a local edit is still in the debounce window or in a POST that has not resolved. Before, the remote snapshot replaced the local view and the stale local payload then landed on the server anyway, leaving this screen showing the peer's data while every other player saw ours — a permanent desync until reload. Skipping the snapshot keeps last-write-wins consistent: the local edit stays visible here and reaches everyone else through the server broadcast once the POST settles. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BJmJivTGUXgxU8S5RcYAxz
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.
A sweep of consistency improvements across the panels, closing gaps where sibling panels already had the feature.
Undo for every destructive shared-state action
Deletes broadcast instantly to the whole table, so an accidental tap used to be unrecoverable. All of these now raise the same Undo toast the other ledgers got in #262:
Global search covers Treasure
The Ctrl+K finder indexed quests, people, places, keywords and journal — but not items, so
@Sword of…mentions of items silently found nothing. Items are now indexed by name, notes and holder, with their own Item badge.Keywords get inline editing
The only text ledger where fixing a typo meant delete + re-add (losing the id). Same pencil/Enter/Escape flow as every other panel.
Journal search
The longest-growing list in the app had no filter. It gets the same quick search the keywords list has (shown once more than three entries exist), matching entry text and author.
Realtime sync fix in
useGameChannelA peer's broadcast arriving while a local edit sat in the 400 ms debounce window (or in an unresolved POST) replaced the local view — and the stale local payload then landed on the server anyway. Result: this screen showed the peer's data while the server and every other player ended up with ours, a permanent desync until reload. Peer snapshots are now skipped while a local edit is pending, keeping last-write-wins consistent: the local edit stays visible here and reaches everyone else through the server broadcast once the POST settles.
Smaller fixes
cellar_door_keyno longer sprout spurious italics.uid()helper collapse into one sharedmakeUid()utility.Testing
useGameChannelspec covering the pending-edit race).🤖 Generated with Claude Code
https://claude.ai/code/session_01BJmJivTGUXgxU8S5RcYAxz
Generated by Claude Code