Skip to content

TSA-265: Editing mode on the verification screen - #312

Merged
IlliaMatushchak merged 21 commits into
mainfrom
feat/TSA-265-editing-mode-on-the-verification-screen
Sep 21, 2026
Merged

IlliaMatushchak merged 21 commits into
mainfrom
feat/TSA-265-editing-mode-on-the-verification-screen

Conversation

@IlliaMatushchak

@IlliaMatushchak IlliaMatushchak commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

Closes: #265

Summary

Implemented the frontend editing flow for the verification screen.

Changes

FE:

  • Added Ctrl+Enter / Cmd+Enter to save the correction and move to the next page.
  • Added Esc to cancel editing without saving.
  • Sends action: "correct" with the edited text, transcriptionId, and durationMs.
  • Preserved the existing keyboard shortcut guard so global verification shortcuts do not trigger while the textarea is focused.
  • Disabled editing actions while the verification request is in flight.
  • Keeps the user's edited text visible when a verification request fails, so their work is not lost.
  • When 409 Conflict:
    • preserves the user's edited text(transcription) in draft separately;
    • show draft besides the transcription to allows user compare his edited transcription with latest transcription
  • Editing is unavailable when the current page has no transcription.

BE:

  • Return editedText ?? text when loading document pages to display corrected transcriptions after page reload.
  • Use edited transcription text when building the verification response for the next page.

@IlliaMatushchak IlliaMatushchak added this to the transcripta-release-4 milestone Sep 16, 2026
@IlliaMatushchak IlliaMatushchak self-assigned this Sep 16, 2026
@IlliaMatushchak IlliaMatushchak added frontend Frontend application feature New feature (auto-applied by the feature template) labels Sep 16, 2026

@IgnacioRB IgnacioRB left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this locally. I could edit a page, press Ctrl+Enter to store the corrected text and mark the page as corrected, discard changes with Esc, and type shortcuts inside the text box without triggering unwanted actions. Just a few observations I encountered:

  1. Automatic focus: When entering edit mode, I noticed one of the acceptance criteria is that the whole flow works without the mouse. The only time I needed it was to click inside the text box to start writing. It would be better if activating edit mode automatically focuses on the text box without needing to click it.
  2. Missing edited transcriptions on reload: When I edited a page and saved with Ctrl+Enter, I reloaded the site and noticed my edits disappeared and remained with the original transcriptions. In the database, they are still saved in the edited_text column, but they don't show up on the verification screen after a reload.

Minor suggestions:
3. Navigation block while editing: While in edit mode, I can still switch pages using shortcuts if I click outside the text box. In a keyboard flow, the risk is low, but it could happen if the user accidentally clicks outside the text box and goes to another page, causing changes to be lost. It would be better to ignore navigation shortcuts (like arrow keys) while edit mode is active, or at least add a warning stating that changes will be lost to prevent users from accidentally switching pages.
4. Reset edit mode on page change: If we open edit mode on a page and navigate to the next one while editing, the edit mode stays active for the following pages. It would be preferred to reset edit mode if it's still active when the page changes.

Comment thread apps/frontend/src/pages/verification/libs/components/verification-workspace.tsx Outdated
@arturobdev

Copy link
Copy Markdown
Collaborator

Tested locally. Editing flow works as expected.

@IlliaMatushchak
IlliaMatushchak merged commit 9708a74 into main Sep 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature (auto-applied by the feature template) frontend Frontend application

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[FE] Editing mode on the verification screen

4 participants