feat(machines): remove owner notes field (PP-blue) - #1585
Merged
Conversation
The per-machine private "Owner Notes" prose field is unused and not very discoverable, so remove it. Prod audit before removal (2026-06-25): of 115 machines exactly 0 had `owner_notes` set, and there were 0 `owner_notes_updated` timeline events — no real data or activity history is lost. Mirrors the tournament-notes removal (#1554). Owner *requirements* is intentionally kept. - schema: drop machines.owner_notes column (migration 0046) - actions: delete updateMachineOwnerNotes; drop ownerNotes from the prose-field unions + PROSE_FIELD_TO_EVENT_KIND; simplify the per-field permission special-casing (only machines.edit remains) - permissions: remove machines.edit.ownerNotes + machines.view.ownerNotes matrix entries (help page auto-generates from the matrix) - timeline: drop owner_notes_updated event kind, formatter case, icon - ui: remove the field + canView/canEdit OwnerNotes props from the machine info tab and page.tsx; update owner-assignment copy - seed: drop owner_notes_updated demo event; switch the demo idempotency sentinel to owner_requirements_updated - e2e: drop owner_notes from clearMachineField union - tests: drop ownerNotes assertions across unit + integration suites Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Main independently added migration 0046 (RLS on pinballmap_catalog, PR #1595) while this branch's owner_notes removal was also numbered 0046. Took main's drizzle/meta, regenerated the owner_notes drop as 0047 via db:generate.
timothyfroehlich
added a commit
that referenced
this pull request
Jul 5, 2026
Brings in PP-blue (#1585, owner_notes field removal). Conflicts resolved: - schema.ts / matrix.ts / timeline (types, icons, format) / permissions tests: main removed owner_notes and its permission + timeline event; we keep our settings additions (settingsRequests/settingsInstructions, machine_settings_sets, settings_set_* timeline events, machines.settings.manage). Dropped the now-unused StickyNote icon import and both ownerNotes permission tests. - Migration collision (both sides added 0047): took main's drizzle/meta (0047_left_triton), deleted our 0047_volatile_vargas, regenerated our settings migration as 0048_magenta_mad_thinker (byte-identical intent, no owner_notes). db:reset applies the full chain + all seeds clean. Verified: no owner_notes references remain in src; pnpm run check green (1414 tests). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018a51xUNaQmXWkTjaoMNvsz
timothyfroehlich
added a commit
that referenced
this pull request
Jul 5, 2026
…1606) PR #1585 (PP-blue) removed the owner_notes feature — including the owner_notes_updated case from formatMachineEvent and the kind from the MachineTimelineEventData union — but did not delete existing owner_notes_updated rows from timeline_events. Any machine with historical owner-notes activity now hits an unhandled switch case in the formatter and renders a blank/broken timeline entry. Surfaced by Weekly Security Review #1603 (rec #2). Display artifact, not a security issue. The event kind discriminator lives in the event_data JSONB column (see machine-event-types.ts), not a dedicated enum column, so this is a one-time data fix keyed on event_data->>'kind'. Hand-authored data-only migration (no schema change, so db:generate emits nothing) following the 0027 precedent; snapshot is identical to 0047 except id/prevId, keeping the drizzle/meta prevId chain intact. Cascades to timeline_event_people via the existing ON DELETE CASCADE. Verified: db:generate reports "No schema changes"; db:reset applies the full chain including 0048 cleanly; post-reset query returns 0 owner_notes_updated rows. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
Removes the per-machine private Owner Notes prose field. It's unused and not very discoverable.
Prod audit (2026-06-25): of 115 machines, 0 had
owner_notesset, and there were 0owner_notes_updatedtimeline events — no real data or activity history is lost. Mirrors the tournament-notes removal (#1554).Owner requirements is intentionally kept — only owner notes is removed.
Changes
machines.owner_notescolumn (migration0046_goofy_shape.sql)updateMachineOwnerNotes; dropownerNotesfrom the prose-field unions +PROSE_FIELD_TO_EVENT_KIND; simplify the per-field permission special-casing (onlymachines.editremains)machines.edit.ownerNotes+machines.view.ownerNotesmatrix entries (help page auto-generates from the matrix)owner_notes_updatedevent kind, formatter case, iconcanView/canEditOwnerNotesprops from the machine info tab andpage.tsx; update owner-assignment copyowner_notes_updateddemo event; switch the demo idempotency sentinel toowner_requirements_updatedowner_notesfromclearMachineFieldunionownerNotesassertions across unit + integration suitesVerification
pnpm run check✅ (1306 unit/integration tests, typecheck:tests baseline gate clean)pnpm run preflight✅ Pre-flight checks passed (types, lint, build, PGlite integration 355 + 104)pnpm db:generatereports no schema drift; local DB confirmsowner_notesdropped,owner_requirementsretainedCloses PP-blue.
🤖 Generated with Claude Code