Skip to content

feat(machines): remove owner notes field (PP-blue) - #1585

Merged
timothyfroehlich merged 2 commits into
mainfrom
feat/remove-owner-notes-PP-blue
Jul 4, 2026
Merged

feat(machines): remove owner notes field (PP-blue)#1585
timothyfroehlich merged 2 commits into
mainfrom
feat/remove-owner-notes-PP-blue

Conversation

@timothyfroehlich

Copy link
Copy Markdown
Owner

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_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 — only owner notes is removed.

Changes

  • schema: drop machines.owner_notes column (migration 0046_goofy_shape.sql)
  • 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/canEditOwnerNotes props from the machine info tab and page.tsx; update owner-assignment copy
  • seed: drop the 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

Verification

  • 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:generate reports no schema drift; local DB confirms owner_notes dropped, owner_requirements retained

Closes PP-blue.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings June 26, 2026 15:18
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pin-point Ready Ready Preview, Comment Jul 4, 2026 7:49pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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
timothyfroehlich merged commit 913f7ff into main Jul 4, 2026
23 checks passed
@timothyfroehlich
timothyfroehlich deleted the feat/remove-owner-notes-PP-blue branch July 4, 2026 20:02
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants