Repository navigation
Support string ids - #221
Conversation
…ation#92) Move the default AI note prompt out of Python source into dna/config/default_note_prompt.yaml, with optional override via DNA_DEFAULT_NOTE_PROMPT_PATH. User settings GET/PUT now return default_note_prompt alongside note_prompt; empty note_prompt means use the deployment default. Settings UI shows the default when the user has no custom prompt and avoids persisting an unchanged default. Tests: wrap App tests with ThemeModeProvider; align useDraftNote expectations with attachmentIds. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: James Spadafora <spadjv@gmail.com>
…or (#2) TipTap prose used font-weight 600 for strong (same as headings) with no em styles. Use 700 + explicit primary color for bold, secondary color for italic, and combined rules for bold+italic so emphasis reads clearly in light and dark themes. Fixes AcademySoftwareFoundation#128 Co-authored-by: Cursor Agent <cursoragent@cursor.com> Signed-off-by: James Spadafora <spadjv@gmail.com> Made-with: Cursor
Signed-off-by: James Spadafora <spadjv@gmail.com> Made-with: Cursor
…rating while saving the prompt Signed-off-by: James Spadafora <spadjv@gmail.com>
Signed-off-by: James Spadafora <spadjv@gmail.com>
feat: configurable default note prompt and settings display (AcademySoftwareFoundation#92)
Signed-off-by: James Spadafora <spadjv@gmail.com>
Keep production-tracking entity IDs as strings while bringing in the latest main. Signed-off-by: James Spadafora <spadjv@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: James Spadafora <spadjv@gmail.com>
…bootstrap script Signed-off-by: James Spadafora <spadjv@gmail.com>
Signed-off-by: James Spadafora <spadjv@gmail.com>
baed017 to
a1783fe
Compare
|
Is it worth having a validation function per provider per key type? Something to ensure the strings dont get crazy long, or that a number is still a positive number, etc. |
We never really set IDs, we get them from the prodtrack provider or vexa. The one exception is the draft notes we store in mongo. |
camerontarget14
left a comment
There was a problem hiding this comment.
Pulled it down and ran it against mock + our SG site — notes/drafts/QC/publish all work, backend tests green at 90%. Couple of things I caught with Claude:
frontend/packages/app/src/qc/noteQcPatch.ts:74 (and same at :82)
still Number() here — backend wants a string now, and this is NaN for ftrack/AYON ids
frontend/packages/app/src/hooks/useNoteQCChecks.ts:18
Number(d.version_id) in the cache key — with UUIDs this collapses every draft to the same key (NaN)
backend/src/dna/storage_providers/mongodb.py:107 (_build_query)
no coercion here means existing docs with int playlist_id/version_id stop matching — mauye we just do a PSA “fresh DB required”? Will wipe anything SPI is working on...
frontend/packages/app/src/components/ChangePlaylistInput.tsx:12
currentPlaylistId?: number — Sidebar passes a string now; the !== at line 198 works by accident
frontend/packages/app/src/components/AddVersionInput.tsx:13
projectId?: number and existingVersionIds: number[] should both be string now
"Typecheck went from 16 errors to 39. The frontend tests are the same 19 failures as main (that ThemeContext localStorage thing, unrelated), but npm run typecheck picks up 23 new ones from this branch. Most are props still typed number while callers now pass strings — works at runtime today but it’s exactly the kind of thing this PR is supposed to kill. Production files: AddVersionInput.projectId, ChangePlaylistInput.currentPlaylistId, VersionStatusRow.projectId in PublishNotesDialog, useProdtrackTabSync.versionId, applyPendingVersionStatus in useDraftNote, useSegments, noteQcPatch. Plus ~8 test files still using numeric fixtures. Worth noting CI doesn’t catch this because the Dockerfile runs vite build without tsc."
Side note: while testing I found that QC-suggested links never reach ShotGrid but that’s a pre-existing bug on main (ENTITY_MODELS is keyed lowercase, links come in as "Shot"), not this PR. Opening a separate issue for it.
Resolve conflicts with AcademySoftwareFoundation#223 (draft note links on publish): adopt the new _draft_note_links/_add_context_links helpers and update_note links support, adapted to string IDs (SCRATCH_VERSION_ID sentinel, _to_sg_id at the ShotGrid boundary). Tests from AcademySoftwareFoundation#223 updated to string fixtures. Signed-off-by: Cameron Target <camerontarget@gmail.com>
No code changes; formatting only, so the follow-up commit stays readable. Signed-off-by: Cameron Target <camerontarget@gmail.com>
Props and refs still typed number while callers now pass strings: AddVersionInput.projectId/existingVersionIds, ChangePlaylistInput .currentPlaylistId, VersionStatusRow.projectId, useProdtrackTabSync .versionId and its lastVersionIdRef, applyPendingVersionStatus in useDraftNote, the segments queryKey cast in useSegments. Remove the last Number() coercions: noteQcPatch link entity_id (the backend rejects ints, and UUIDs became NaN) and the useNoteQCChecks fingerprint (UUIDs collapsed every draft onto one key). validateActivationPayload still required a numeric playlistId, so the extension transcription route would always report invalid_payload; it now checks for a non-empty string. Test fixtures updated to string IDs; drops a duplicate attachment_ids key in useDraftNote.test.tsx. npm run typecheck is back to the errors already present on main; no new test failures. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Cameron Target <camerontarget@gmail.com>
Summary
This is a large refactor the changes the datatype of IDs within DNA.
Reason
When we first started DNA, we used Shotgrid as our main driver to structure the production data in the app. As a result ints were used as the IDs. As other PT providers have shown interest, we see that the int does not have the flexability to allow for support. Ftrack and Ayon both use strings for the IDs.
Approch
I used cursor to reactor the Datatype for IDs. In the shotgrid provider we handle the conversion of strings to ints and back. In addition, the frontend now protects the ID passing via URL by encoding the IDs.
Other change
To make switching testing setups quickly, I updated bootstrap.sh to allow you to change single settings instead of reiniting all the settings.
Testing
How I Tested
To test, I used the app both with the mock and shotgrid provider. All the features seem to be working.