Skip to content

Merge to main#48

Merged
grubermeister merged 17 commits into
mainfrom
staging
May 24, 2026
Merged

Merge to main#48
grubermeister merged 17 commits into
mainfrom
staging

Conversation

@grubermeister

Copy link
Copy Markdown
Collaborator

Everything's looking good on staging, approved to publish. Hello, Boston!

grubermeister and others added 17 commits May 17, 2026 21:38
- Bump Node-based actions to versions running on Node 24
  (checkout v5, setup-node v5, upload-artifact v5, setup-uv v7)
  ahead of GitHub's June 2, 2026 Node 20 cutoff.
- Run "Build frontend" before "Django system checks" so the
  STATICFILES_DIRS entry (frontend/dist/) exists when manage.py
  check runs, clearing staticfiles.W004 in CI logs.
- Silence models.W036: allauth's EmailAddress declares a partial
  unique constraint that MariaDB cannot enforce at the DB layer;
  uniqueness is still enforced by allauth at the application
  level, so the warning is a known no-op.
- Export PATH on the SSH deploy step so non-interactive shells
  pick up the user-local uv install at ~/.local/bin/uv.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@grubermeister grubermeister self-assigned this May 24, 2026
@grubermeister grubermeister merged commit 52de923 into main May 24, 2026
2 checks passed
grubermeister pushed a commit that referenced this pull request Jul 3, 2026
Editors can now relate records that already exist, instead of only
attaching brand-new covers to the one marking being viewed:

- RecordDetail: "Link Existing Cover" dialog (ID or C-42 code) POSTs the
  existing cover-markings endpoint and refreshes the associated list.
- CoverDetail: "Link Existing Marking" dialog, same endpoint, refreshes
  associated markings + the review link.
- Both buttons are gated to editor/admin (isStaff) to match the
  endpoint's IsEditorOrAdminWrite permission.
- ID parsing extracted to lib/recordLinking with unit tests.

Ported by hand from the pre-refactor reese/cover-workflow-improvements
branch (7ae724a); image-move parts of that branch land separately (#48).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
grubermeister added a commit that referenced this pull request Jul 3, 2026
* #47: link existing covers and markings from the detail pages

Editors can now relate records that already exist, instead of only
attaching brand-new covers to the one marking being viewed:

- RecordDetail: "Link Existing Cover" dialog (ID or C-42 code) POSTs the
  existing cover-markings endpoint and refreshes the associated list.
- CoverDetail: "Link Existing Marking" dialog, same endpoint, refreshes
  associated markings + the review link.
- Both buttons are gated to editor/admin (isStaff) to match the
  endpoint's IsEditorOrAdminWrite permission.
- ID parsing extracted to lib/recordLinking with unit tests.

Ported by hand from the pre-refactor reese/cover-workflow-improvements
branch (7ae724a); image-move parts of that branch land separately (#48).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* #48: move images between markings and covers, both directions

v1 had no cover table, so every uploaded cover photo is stapled to a
marking. Editors can now reassign an image's polymorphic subject:

Backend:
- ImageSerializer update-path validate(): target subject must exist
  (subject_id is a bare integer column, nothing else checks) and
  image_view must match the new subject_type — 400s instead of the DB
  check constraint's 500.
- ImageViewSet.perform_update: on subject change, the moved image lands
  at the end of the target's display order (never displacing its
  default) and the source subject promotes a new display_order=0
  (mirrors perform_destroy).

Frontend:
- RecordDetail: "Move to cover" action on marking-subject thumbnails;
  dialog targets covers already linked to the marking, with a cover
  image-view select (Ian/Wayne's Charlestown cross-contamination case).
- CoverDetail: reverse "Move to marking" via a new optional onMoveImage
  action on EntryAssociatedThumbnailsCard; targets linked markings with
  FULL/DETAIL views.
- services/markings.moveImageSubject(): PATCH /images/{id}/ with field
  error surfacing.

Tests: +5 backend (both directions, display-order bookkeeping, 400 on
missing target, 400 on view mismatch, 403 for contributors). Suite
135/136 (1 pre-existing staging failure, see PR #83).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Michael Connolly <connollymp3000@gmail.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.

1 participant