feat(kit-builder): backup completo no beforeunload + restore real (FT-119) #3367
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 204 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.318
Real PR Conversation Timeline
1 comments
"Review active on #3367"
general
weight: 0.35
adm01-debug
O que muda
Restauração automática de estado completo do Kit Maker após fechamento acidental da aba.
Antes: backup salvo no
beforeunloadcontinha apenaskitId+snapshot(string). Ao reabrir, o usuário via apenas um toast pedindo para navegar de volta ao kit — sem restaurar o estado local que ainda não tinha sido salvo no banco.Depois: o backup também inclui
fullState(caixa, itens, personalização, identidade, notas, quantidade). Na próxima visita:fullState: comportamento anterior (navegar ao kit pelo banco).Arquivos tocados
| Arquivo | Mudança |
|---|---|
|
src/hooks/kit-builder/useKitAutoSave.ts| ExportaBackupFullState; salvafullStatenobeforeunload; retornafullStatenoconsumeUnloadBackup||
src/hooks/kit-builder/useKitBuilderPageState.ts| AdicionarestoreFromBackup+ expõeconsumeUnloadBackupnosactions||
src/pages/kit-builder/KitBuilderPage.tsx|checkedBackupRef+useEffectde restore após hidratação; importauseRefetoast|Verificação
e70479b(main HEAD) — zero divergência de históricosrc/— nenhum arquivo de governance, migration ou workflowmergeable_state: dirtypor divergência em commits de docs antigos🤖 Generated with Claude Code
https://claude.ai/code/session_01VXkRxafXhqqt3j3oxCDguY