feat(ENG-367): the transcription wait becomes a screen, and resuming lands in the right place - #157
Merged
Merged
Conversation
… o lugar Nada indicava que a transcrição estava rodando além da palavra 'transcrevendo' dentro de cada um dos 41 cartões — com a revisão inteira já lá para ser mexida enquanto o texto ainda ia mudar. Agora o miolo da revisão é a espera enquanto o job roda, com o cometa de contas que já servia às outras esperas do fluxo (ENG-337). Não é troca de tela: a região aria-live fica montada nos dois estados, senão o anúncio dos rascunhos se perderia calado — uma região criada junto com o conteúdo não é anunciada. Falha e estouro de prazo NÃO seguram ninguém: a revisão abre e cada cartão traz seu 'tentar de novo'. Só 'running' espera. E a retomada: com tudo respondido, reabrir caía na última pergunta da entrevista, convidando a regravar o que já existia. Agora vai para a revisão.
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.
Closes ENG-367.
The loading animation already existed
PreparingSession(ENG-337) is the olive waiting screen with the bead-comet running along the cord — already used for three other waits in the flow. Nothing new was drawn; this reuses it, which is what "alguma animação já feita" asked for.What changed
1. The wait is the screen, not a word per card. While the STT job runs, the review's body is the waiting state instead of 41 cards each saying "transcrevendo" — with the whole review already there to be edited while the text was still going to change.
2. It is a body swap, not a screen swap. The
aria-liveregion stays mounted in both states. A live region created at the same time as its content is not announced, so replacing the whole tree would have lost the drafts announcement silently. I hit exactly that while building it: my first version early-returned a separate<section>, and the existing a11y test caught it — the region was a different DOM node before and after, so the announcement never fired. The test earned its keep.3. Failure does not trap anyone. Only
runningwaits.failedand the give-up timeout open the review, where each card carries its own retry — typing by hand always resolves (§8.7, no dead end).4. Resuming. With every question answered or recorded, reopening dropped you on the last interview question, inviting a re-record of an answer that already existed. It now opens the review — or its wait, if transcription is still running. With a question still open, the interview is still the right place, unchanged.
Tests
The old per-card "transcrevendo" test is rewritten to the new behaviour: while the job runs there are zero cards, no answer field, and the live region is still mounted. The conversation resume test flips from "reopens on the last question" to "never back on the interview".
Gates:
typecheck0,lint0 errors,test1329 passed / 144 files,golden16 passed,e2e13 passed.Note: branched off
mainbefore #156 (ENG-369) merged. Different regions ofreport/index.tsx, so they should not conflict.