Repository navigation
The web and the iPhone app take library actions through one createLibrary - #121
Merged
Merged
Conversation
…rary that owns each route, body and error; the iPhone app refetches what each makes stale in one place Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Per4f8yL5A7nL9frZVDJj7 Signed-off-by: NiallJoeMaher <nialljoemaher@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…rops the finished session section Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Per4f8yL5A7nL9frZVDJj7 Signed-off-by: NiallJoeMaher <nialljoemaher@gmail.com>
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.
Architecture candidate "the library actions, once" (
docs/architecture.md).packages/client:createLibrary(client)holds the actions both apps take (move, restore, edit, remove, fromBin, forever, Tags, Lists, setTag, setInList, mark, reorder, putBack). Each one owns its route, body and how its error is read (throughanswer). It runs over a transport:sameOrigin()for the web (the session cookie) or the iPhone app's bearerapi. There's one fake-fetch test per action, plus tests for error mapping and for a 404 when taking an Item out of a List.lib/moves.ts,tagging.tsandlisting.tsare replaced bylib/actions.ts, which holds the library,went()(did it go through) and the moves that also update the rail counts. ItemBar, ItemList, ItemTags, ItemLists, ArchiveView, ListView, TagsSection, Reader, Preview and NoteEditor now use it.lib/data.tswraps each action with what it makes stale, so screens no longer repeatinvalidateQueries. pick, lists/[id], archive, bin, tags, ItemsScreen and usePatchItem now use it.One behaviour change: on the iPhone, Undo after taking marked rows out of a List now marks them again, as the web already does.
Gates: typecheck, lint, test (499), e2e (56) and design (0) all pass. The iPhone screens were only typechecked.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Per4f8yL5A7nL9frZVDJj7