Files
projax/internal/itemwrite
mAi 67577396a2 feat(web): Phase 6 Slice C — route every web write + validator through the adapter
Wire all web-side writes to depend on the interfaces (Server.Writes for
writes, Server.Items for the write-pre-flight reads) instead of the
concrete *Store, so PROJAX_BACKEND will flip them with the reader:

- handleDetailWrite / handleReparent / handleNewSubmit: Update / Reparent /
  Create now go through s.Writes; ValidateAgainstStore now reads s.Items
  (was s.Store) so cycle + collision detection runs against the live
  backend, not stale projax.items.
- dashboard_pin: SetPinned via s.Writes.
- links: AddLinkDated / DeleteLink via s.Writes. linkBelongsToItem now
  resolves ownership through s.Items.LinksByType — a direct
  projax.item_links query would reject every delete under the mBrian
  backend. Dropped the now-dead isNoRows + errors import.
- caldav: all four AddLink + the unlink DeleteLink via s.Writes.
- bulk applyBulk: replaced the raw single-tx multi-row UPDATE with
  interface calls — make_public/private map to SetPublic; the field
  mutations (tags/mgmt/status/timeline-exclude) are read-modify-write via
  Update. Cross-row tx atomicity is dropped (mBrian's HTTP write API has
  no multi-node tx); acceptable at m's bulk-edit scale, one write path
  across both backends. Added updateInputFromItem + appendUnique/removeValue.

- itemwrite: slug uniqueness is now per-user-global (Q6=a, matching
  mBrian's idx_nodes_slug) instead of per-parent. Strictly tighter, so
  still correct on the legacy backend. Test updated to assert the new rule.

Build green. Web suite: only the 8 pre-existing failures remain (4
project_filter + TestTimelineKindMultiValueSurvives + 3 timeline_filter,
all /timeline-301 / seeding issues on main, unrelated to slice C). No new
failures from the rewiring.
2026-06-01 12:18:03 +02:00
..