fix(#197): document view UX — nav, lock toggle, diff buttons, tooltip#200
Merged
Conversation
- DocumentView: redesign navbar — chunk progress dots, context-aware scroll-sync / diff toggle (Link2 in both mode, GitCompare in single mode) - Panel header min-height alignment so text baselines match across panels - usePanelScrollSync: new hook, capture-phase ratio-based sync, anti-loop ref - useStageDiff: new hook using diff npm lib for word-level HTML diff - hl-diff-add / hl-diff-rm CSS classes added to index.css - PipelineStrip: delete pipeline per-tab (×, group hover), confirm dialog - uiStore: maxPipelines (default 5, persisted, migration v2→v3) - Diff mode: visible only in single-panel view; replaces MarkdownEditor with HighlightedText; stage A/B selectors replace stage tabs in navbar - i18n: new keys for scrollSync, diffMode, finalDraft, deletePipeline
- Rimuove subtitle stage dal pannello traduzione (modalità normale) - Stage buttons: aggiunge separatore + nome stage attivo (○○○ | nome) - CopyButton spostato in titleMeta (visibile anche senza subtitle) - Bottone audit: aggiunge onClick → apre StageTraceDialog - StageTraceDialog: gestisce isJudge per mostrare judgeResult - enabledStages memoizzato con useMemo (fix effect dep instabile) - Rimossa min-h-[72px] dall'header DocumentPage (poteva schiacciare contenuto)
- Aggiunge token editorial-running (#C49B2A) per stato in esecuzione - StatusIndicator + CompactStatusIndicator usano editorial-running (giallo) per processing/retrying con animate-pulse - Stage indicators spostati nella riga del nome pipeline nel run panel (destra, allineati) - CompactStatusIndicator: aggiunta prop size (sm|md) per varianti dimensionali - Stage disabilitati mostrati con opacity-25 nel run panel - Stage indicators rimossi dal nav bar (destra) — solo diff select + lock rimangono - Chunk dots: h-2.5 w-2.5 (da 6→10px), colore idle editorial-charcoal/25, ring attivo charcoal/50 - DocumentPage header: separatore | tra CopyButton e stage switcher, ml-6 - Stage switcher nome: larghezza fissa w-[8rem] per evitare layout shift al cambio stage
Sposta run panel, stage indicators e controlli pipeline dalla DocumentView alla nuova PipelineSidebar (w-52), lasciando la nav bar solo per navigazione chunk e controlli vista. - Nuovo componente PipelineSidebar con selettore pipeline, run panel, indicatori stage colorati (editorial-running per processing/retrying), modalità test/produzione, conteggio chunk, pulsanti run/stop - DocumentView semplificata: rimosso run panel (~190 righe), prop ridotte a solo onRetranslateChunk - uiStore: aggiunto traceStageId/setTraceStageId (non persistito) per condivisione stato tra PipelineSidebar e DocumentView - App.tsx: sostituito PipelineStrip con PipelineSidebar Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, tooltip - Chunk nav centrata nella barra: layout 3-colonne con flex-1 bilanciato - Test mode badge: solo icona (FlaskConical 11px), nessun padding che allunga la riga - Diff mode: tutti i pulsanti sempre visibili; stage buttons disabilitati in diff mode, diff pair buttons rotondi con icona (stile ChunkIconButton), disabilitati fuori diff mode - Lock traduzione: toggle compatto spostato accanto al titolo del pannello (dimmed/verde), rimosso ChunkIconButton ridondante dal toolbar destro - Tooltip: nuovo componente condiviso - ConfirmDialog: backdrop come motion.div con click-to-close e stopPropagation - CopyButton, IconButton, PipelineSidebar, stores, i18n: rifiniture manuali
- Tooltip: move unsafe cast inside isValidElement guard - PipelineSidebar: guard currentChunk when selectedChunkId not found - DocumentView: use enabledStages in nav bar, hoist no-op onChange - usePanelScrollSync: remove unused fromCtr param - useStageDiff: early return on empty inputs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
flex-1bilanciato a sx/dx, counter sempre al centro della barraChunkIconButtonrotondi con icona dello stage "from", si disabilitano fuori diff modeChunkIconButtonridondante dal toolbar destrosrc/components/ui/Tooltip.tsxmotion.divcon click-to-close estopPropagationsul dialogTest plan
closes #197
closes #8