Skip to content

feat(studio): unify studios and text memory - #488

Open
nikazzio wants to merge 15 commits into
mainfrom
feat/translation-studio-layout
Open

nikazzio wants to merge 15 commits into
mainfrom
feat/translation-studio-layout

Conversation

@nikazzio

@nikazzio nikazzio commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Implementazione

  • Studio di traduzione e Studio di trascrizione inclusi nello stesso ramo; base main.
  • T7: risorse comuni, prompt filtrabili, dizionari condivisi/locali con ambito esplicito, filtro su tutti i workspace collegati.
  • Corpus di unità testuali, revisioni immutabili, embedding multipli con modello/provider/dimensioni/profilo obbligatori; ricerca solo compatibile, locale o globale.
  • Provenienza libro/versione/workspace, tag manuali, ricalcolo delle misure e backup completo. Eliminare una traduzione conserva i testi archiviati, che diventano non assegnati.
  • T8: costi su pannelli comuni; conteggio blocchi mantenuto come confermato.
  • Documentazione in-app e pubblica IT/EN, architettura, design system e piano corpus aggiornati.

Review precedente

Corretti tutti i nove rilievi: blocco uscita durante pipeline; errori tecnici conservati nei log per salvataggio, stato e storico; normalizzazione UTC delle date SQLite; accessibilità dei selettori e spiegazione dei tab indisponibili raggiungibile da tastiera.

Verifiche

  • npm run lint:all: passato.
  • cargo clippy --lib --tests -- -D warnings: passato.
  • cargo fmt e git diff --check: passati.
  • Suite Rust: 640/640 passati (porte wiremock disponibili fuori sandbox).
  • Suite frontend completa: 1232/1242 al primo giro. Corrette due asserzioni per aria-disabled; sette suite fallite ricontrollate con un worker: 27/27 passati, compresi i precedenti timeout.
  • Nessuna build app, E2E o chiamata a pagamento eseguita localmente. CI del nuovo commit e prova nell'app da verificare.

Migrazione e passaggio di sessione

La baseline 0001 è stata ripristinata byte per byte al checksum originale.
La nuova 0003_text_corpus.sql aggiorna il database esistente in una transazione,
conserva testi/metadati/tag/provenienza e trasferisce vettori con modello
registrato e dimensioni supportate. Non inferisce modelli per vettori anonimi.
Nessun reset del database: il consolidamento prima del merge è riservato all’utente.
L’upgrade è stato verificato su una copia in memoria del database locale;
il database originale non è stato modificato dall’agente.

UI/UX non approvata dall’utente: necessaria una nuova revisione visiva.
Implementazione e test non sostituiscono l’accettazione nell’app.

Selezione di pagine/sezioni, analisi semantica e tag automatici restano sviluppi futuri.

Refs #227, #391, #485.

…rea inks

- Studio: the root can shrink below its toolbars' natural width, so the
  right column no longer leaves the window; manual save of a version
  (command next to the save indicator and Ctrl/Cmd+S, also inside the page).
- Transcriptions landing page rebuilt as a catalogue like the Library:
  shelves, search, quick filters (workspace, library, century), sort,
  grouping, list/grid/table views, row commands (open work, rename |
  archive, delete). New listTranscriptionCatalog query with written and
  verified pages.
- Shared catalogue parts extracted from the Library and reused by both:
  CommandBar, ShelfItem, CatalogSearchField, CatalogViewSwitch,
  CompletionBar, catalogStyles, catalogGrouping.
- Area inks and papers (Library petrol, Transcriptions sepia, Translations
  indigo): rule under the area title, tinted rail icon, background paper,
  sepia placeholder for missing covers.
- Docs: in-app guide, public guides (IT/EN), architecture, design system,
  roadmap.
…y theme

Foundations (whole app):
- on-ink/on-accent text tokens replace text-white (unreadable in dark mode),
  `dark:` variant bound to the app setting, shadows and highlight/diff colours
  as themed tokens, caption/tracking tokens and the caption-label utility,
  rule/rule-faint border strengths instead of eight opacities.
- useIsDarkTheme as the single theme check; theme.test keeps code colours in
  sync with index.css.
- Shared ResizeHandle, PanelSection, PageHeader, INSPECTOR_WIDTH, ChoiceDots;
  common fields moved to FIELD_* styles.

Transcription Studio (#485 M):
- Split into hooks and parts (1040 -> 253 lines), behaviour unchanged.
- Right column like the Library: History/OCR/Summary, flat version list with
  current/verified marks, Metadata merged into Summary, neutral OCR command.
- Text bar: check icon for verify, disabled reasons, arrows only when
  detached, single save/retry command, gold reading label, narrow layout.
- Viewer toolbar moves secondary commands into its menu when narrow.
- Create dialog: no double creation, keyboard work search; log tab errors,
  local times, shared cost format; overlay keeps editor focus.
- Docs: in-app guide, public guides (IT/EN), architecture, design system.
Shelves, quick filters, grouping and three views for the Translations page;
create dialog with optional import file; shared rename field. Session log
with the translation studio analysis and T1-T9 plan.
The translation studio now opens inside the app frame with the main bar
visible. Header row with translation name, centred pipeline group (rename,
switch, options, languages) and whole-translation commands. Chunk strip
with a seven-dot sliding window, single and seven-step arrows, wheel,
stage indicators and document search. One Tools column at the common
width: compact run block (switch, steady counter, costs) and five tabs,
Memory, Review and Document grouped as sub-tabs on the common tab strip.
Design-system pass over the studio: tokens instead of hand-written
opacities, caption sizes, common search field, icon commands in notes,
lighter glossary, new-note command.
Saving (T2):
- save state lives in the status bar for translations and transcriptions;
  the sheet header keeps only the save button, red with retry after an error
- Ctrl/Cmd+S saves the open translation even while typing, no success toast
- every exit (back, main rail, breadcrumb, workspace switch) saves first and
  stays in the translation if the save fails (projectStore.leaveProject)
- stage and comparison controls move to a vertical column in the page margin,
  so both pages keep the same header height

Verification (T3):
- circled check next to the candidate title replaces the lock; the
  "source changed" label sits beside it instead of replacing it
- verifying clears "needs updating"; check disabled while the chunk runs
- no lock badge on the source; ochre "needs updating" corner mark
- disabled commands carry their reason ("Command — reason") across sheets,
  stage column, header, run section and main rail

Docs: in-app help, public docs IT/EN, architecture, design system, roadmap,
session log.
- Review gains a History sub-tab listing the open segment's versions,
  newest first: author (pipeline or manual), date, current and verified marks
- the save button and Ctrl/Cmd+S write a manual version for every segment
  changed since its last one; autosave still writes none. The button stays
  on while a segment has unversioned text, even if the project is saved
- restore puts a version back on the page and records it as a new version;
  off on verified translations and while the segment runs
- no delete, no names yet (would need a new column; listed as future work)

Docs: in-app help, public docs IT/EN, architecture, roadmap, session log.
Configuration window with six shared tabs, pipeline name as title, reset
all translations as a danger icon with its reason, and the shared veil
while the pipeline runs. Stages and quality control share one model
section and the common prompt editor; no fixed explanations, only hints
and disabled reasons. Saved prompt templates open from anchored menus
with shared search, rows and name field; deletion lives in the language
resources only.
The translation text of the chunk in progress is covered by the shared
veil in its running tone, so it can no longer be edited while the
pipeline writes it; the stage column stays usable.
…h scope

T7a done: references and chunk memory as flat rows with provenance; memory
opens on verified translations; saved pairs removed one by one, saving only
adds. Backend: add-only save, optional workspace/chunk filters, search
across workspaces with language-pair filter and provenance; migration 0002
adds the workspace switch column (no UI yet). Template update in store.
T7b-e pending, see session log.

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 review overview

🟡 Changes recommended

Leaving during processing can clear active project state, and several new controls have accessibility or error-display defects.

Review effort: Balanced
Findings: 1 High severity · 8 Medium severity

Open (9)
What changed in this PR

This PR restructures the Translation Studio and catalogue while adding revision history, phrase-memory provenance, safer saving, and supporting UI primitives.

Changes:

  • Adds catalogue filtering, grouping, sorting, and the new Studio layout.
  • Adds manual revision history and save/leave behavior.
  • Extends phrase memory, UI controls, migrations, tests, i18n, and documentation.
File Description
src/​types.ts Extends workspace and phrase provenance types.
src/​utils/​translationCatalogFilters.ts Implements catalogue filtering and ordering.
src/​utils/​translationCatalogFilters.test.ts Tests catalogue behavior.
src/​utils/​memoryPreLaunchCheck.test.ts Updates phrase-match fixtures.
src/​test/​i18n-mock.ts Updates translation mocks.
src/​stores/​translationHistoryStore.ts Tracks revision state.
src/​stores/​translationHistoryStore.test.ts Tests unversioned chunks.
src/​stores/​transcriptionStore.ts Adds text-save status.
src/​stores/​promptTemplateStore.ts Adds template updates.
src/​stores/​projectStore.ts Adds save-version and leave flows.
src/​stores/​projectStore.test.ts Tests project-leaving behavior.
src/​stores/​phraseMemoryStore.ts Preserves phrase provenance.
src/​stores/​phraseMemoryDraftStore.ts Supports saved-candidate removal.
src/​stores/​chunksStore.ts Clears stale state on verification.
src/​stores/​chunksStore.test.ts Tests verification behavior.
src/​stores/​__tests__/​phraseMemoryStore.test.ts Updates provenance fixtures.
src/​stores/​__tests__/​phraseMemoryDraftStore.test.ts Tests phrase drafts.
src/​services/​translationRevisionsService.ts Persists translation revisions.
src/​components/​projects/​TranslationCatalogTable.tsx Renders sortable catalogue table.
src/​components/​layout/​AppStatusBar.tsx Displays unified save status.
src/​components/​document/​ProjectSaveButton.tsx Adds manual save control.
src/​components/​document/​manualSave.ts Handles manual-save feedback.
src/​components/​translation/​TranslationHistoryList.tsx Displays and restores revisions.
src/​components/​ui/​TabStrip.tsx Adds reusable tab navigation.
src/​components/​ui/​ChoiceDots.tsx Adds radio-style choice control.
src/​hooks/​usePhraseProvenanceLookup.ts Resolves phrase provenance labels.
src-tauri/​migrations/​0002_workspace_memory_scope.sql Adds memory-scope persistence.
src-tauri/​migrations.lock Records the new migration.
src/​i18n/​it.json Adds Italian interface copy.
src/​i18n/​en.json Adds matching English copy.
docs-dev/​ARCHITECTURE.md Documents the revised architecture.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/stores/projectStore.ts Outdated
Comment thread src/components/document/ProjectSaveButton.tsx Outdated
Comment thread src/components/document/manualSave.ts
Comment thread src/components/layout/AppStatusBar.tsx Outdated
Comment thread src/components/projects/TranslationCatalogTable.tsx Outdated
Comment thread src/components/translation/TranslationHistoryList.tsx Outdated
Comment thread src/components/translation/TranslationHistoryList.tsx
Comment thread src/components/ui/ChoiceDots.tsx Outdated
Comment thread src/components/ui/TabStrip.tsx
Complete T7 resources, T8 cost panels and nine PR review fixes.
Preserve archived text provenance after translation deletion.
Include translation and transcription studios in one review branch.

BREAKING CHANGE: beta baseline requires explicit test database recreation.
Model-less vectors and old corpus backup shapes are unsupported.
Existing local databases were not modified.

Refs #227, #391, #485
@nikazzio nikazzio changed the title Feat/translation studio layout feat(studio): unify studios and text memory Oct 3, 2026
@nikazzio
nikazzio changed the base branch from feat/transcription-studio-usability to main October 3, 2026 21:02
Select the primary project heading in the browser test.
Scope double_must_use allowances to async_trait-generated futures
on JobHandler and LlmProvider for Clippy 1.99 compatibility.
Restore migration 0001 and its checksum. Upgrade existing memories in migration 0003 without resetting the database. Consolidation remains reserved to the user before merge.

This branch has not been deployed

No deployments
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