Skip to content

refactor: internalization resource dialogs and artifact category selector - #480

Draft
nabalone wants to merge 12 commits into
developfrom
internalize_refactors
Draft

refactor: internalization resource dialogs and artifact category selector#480
nabalone wants to merge 12 commits into
developfrom
internalize_refactors

Conversation

@nabalone

Copy link
Copy Markdown
Collaborator

Refactoring pass over the Passage Detail → Internalization resource flow. No Jira ticket.

What changed

  • Add Resource / Add Audio dialogs — resource kind is now controlled from parent state; tightened dialog layout, restored the upload drop zone, kept the recorder content-sized and removed the record-button gap.
  • AddResourceAction — Add Resource menu actions are now typed with an enum instead of loose values.
  • ResourceData / PassageDetailArtifacts (+ mobile) — internalization resource state cleanup.
  • SelectArtifactCategory — simplified the artifact category selector.
  • UploadRecordToggle — new shared upload/record toggle component.
  • PassageRecordDlg — substantial rework (a TODO is left in place noting it should be renamed).
  • Localization — new/updated strings in TranscriberAdmin-en-1.2.xliff with regenerated model.tsx / reducers.tsx and strings JSON.

Notes

  • Opened as a draft and intentionally left unverified — no typecheck/lint/test run and no code review yet.
  • Branch has not been rebased onto the latest develop (currently behind); rebase before marking ready.

🤖 Generated with Claude Code

nabalone and others added 12 commits July 22, 2026 16:38
Keep the selected resource kind synchronized across mode changes and align upload and record action spacing.

Co-authored-by: Cursor <cursoragent@cursor.com>
…rce wizard ref

Make SelectArtifactCategory always render the free-solo Autocomplete
(type to filter or add a category), dropping the old Select + "add new"
menu variant, the now-unused `autocomplete` prop, and its dead helpers.
Rename `wizardAddRef` to `isAddingAudioResourceRef` in the desktop and
mobile PassageDetail artifacts components for clarity and remove stale
TODO comments.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Only pass onSpeaker into MediaUploadContent for Media uploads so Resource/ProjectResource keeps hasRights and the file drop target stays usable.

Co-authored-by: Cursor <cursoragent@cursor.com>
Raise the dialog to 700px when space allows, and only pin the record button with space-between in full-height mobile panes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Wrap MediaRecord so height:100% cannot resolve against DialogContent and open a gap above the record button.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace magic action strings shared by AddResource and both artifact views.

Co-authored-by: Cursor <cursoragent@cursor.com>
Lift section/passage/general resource scope into parent state so radios
stay in sync across Upload/Record remounts without a local sync effect.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gtryus
gtryus force-pushed the develop branch 2 times, most recently from 88b8855 to c2ddd39 Compare August 21, 2026 03:26
@nabalone

Copy link
Copy Markdown
Collaborator Author

@nabalone This branch conflicts with develop and I'm leaving it untouched — the resolution needs decisions I can't recover from the diff. Nothing was pushed; the branch is exactly as you left it.

25 conflict hunks across 7 files. Most of the volume is mechanical (prettier churn, plus buttons that #537 "Button overhaul" already converted the same way you would), but three items are real decisions:

  1. Internalization/AddResource.tsx — you typed the menu actions with the new AddResourceAction enum and kept stopPlayer / buttonDark / buttonElevated / buttonSx. Button overhaul #537 deleted exactly those four props (the new Button doesn't take them) and kept action?: (what: string) => void. Keeping your enum while dropping the styling props is probably right, but both call sites — PassageDetailArtifacts.tsx and PassageDetailsArtifactsMobile.tsx — are also conflicted, so it's one prop-surface decision spanning three conflicted files, not a local fix.

  2. Internalization/ResourceData.tsx — your side removes resourceKindFromProps / value / setValue (consistent with "resource kind is now controlled from parent state"); develop still has that local state. I can't tell whether develop's block is newer work that must survive or just the state you deliberately lifted to the parent.

  3. store/localization/exported-strings-name.json — your side points at strings12d2f0d2.json, develop at strings6254aa94.json. This is a generated pointer, so picking either side ships a bundle missing the other side's strings. It needs regenerating from the merged TranscriberAdmin-en-1.2.xliff, which I won't do blind.

PassageRecordDlg.tsx (7 hunks) and Sheet/SelectArtifactCategory.tsx (6 hunks) are the remaining churn — both sides restyled the same dialogs, so they're likely fine once (1) is settled, but I didn't want to push a partial resolution.

For reference, the other three conflicted PRs did resolve cleanly and are pushed: #531, #515, #484.


Generated by Claude Code

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