Repository navigation
One Item module makes every new Item and decides which changes fit - #120
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…o an edit and a batch refuse a misplaced Done the same way 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>
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>
NiallJoeMaher
force-pushed
the
arch-item-module
branch
from
October 27, 2026 07:34
d63106b to
ed8987d
Compare
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.
Candidate #1 from
docs/architecture.md, the part about an Item's shape and which changes fit it.What changed
packages/db/src/item-doc.tsholdsnewItem(the whole new-Item document),replucked,statusFieldsandmisfit(which changes fit an Item: text, Kind, Done).newItem:pluckLink,createFileItem,createTextItem,createEmailItemandimportLink. Re-pluck initems.tsandemail-in.tsusesreplucked. Ticking a Todo in a List usesstatusFields.isTaskandTASK_KINDSare now inshared-schemas.lists.ts,digest.ts,items.ts,ItemBar,ItemListand the iPhoneItemsScreenuse them, so the"todo" || "thing"check isn't written out in each file any more.updateItemasksmisfitinstead of repeating the three checks. The error messages are the same as before.Edit and batch now agree: batch refuses
Before,
/items/batchandbatch_updateskipped any Item a change didn't fit and said nothing about it. Now the whole call is refused with the same 400 and message an edit gives, anddetails.itemIdsnames the Items that don't fit. Nothing changes, and no tags move either: the change is checked before tags are applied.Why refuse instead of skip:
batch_updatealready refuses the whole call for an unknown tag.detailsback to the AI, so it can resend without those Items. Under the old behaviour it could report Items as moved when they weren't.docs/mcp.mddescribes the new behaviour.Done also follows the Kind the Item ends with in batch now, as it already did in edit.
{kind: "todo", status: "done"}on a Note is allowed; before, batch skipped it.Tests
item-doc.test.ts: a table test ofmisfitwith 15 rows, plusstatusFields.triage.test.ts: the batch test covers all-or-none, the refused ids, and two users (B's Items are never changed or named, even ones that wouldn't fit).apps/webitems.test.ts: a refused batch is a 400 withdetails.itemIds, and its tags don't move.pnpm typecheck,pnpm lintandpnpm testpass (71 files, 461 tests). I didn't run e2e or design.🤖 Generated with Claude Code
https://claude.ai/code/session_01Per4f8yL5A7nL9frZVDJj7