Skip to content

fix(wizard): no mezclar el chat al cambiar de workspace a mitad de turno - #48

Closed
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-4478
Closed

fix(wizard): no mezclar el chat al cambiar de workspace a mitad de turno#48
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-4478

Conversation

@cursor

@cursor cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown

Qué

El chat del Wizard está scoped por workspace (.wizard-conversation-v1.json + localStorage). Si select_workspace (o un cambio manual) ocurría mientras un turno seguía busy, el panel reasignaba conversationWorkspace al destino sin cargar su hilo y persistía el transcript de origen encima.

Impacto

Escenario: workspace A y B tienen chats propios. El usuario en A pide «cambia a B y exporta la escena» (o cambia de workspace a mano durante el turno).

  • El historial de A se escribe en B (localStorage + CAS del servidor).
  • El turno nuevo no se guarda en A.
  • Un save en vuelo de A podía copiar su revisión CAS a B → 409 persistentes y el servidor de B deja de actualizarse.

Fix

  • El turno in-flight sigue atado al workspace de origen hasta que busy termina; entonces B carga su propio chat.
  • Hydrate y save ignoran escrituras que ya no pertenecen al owner actual (el catch de 409 ya tenía el guard; el success path no).

Verificación

ui/tests/agentContract.test.mjs: contrato nuevo a busy workspace switch does not rebind or accept writes for another Wizard chat.
Suite UI: 448/448.

No reabre el TTS cap (#21, draft) ni el historial de Character Creator (#25, mergeado).

Open in Web View Automation 

Un select_workspace (o un cambio manual) durante un turno busy reasignaba
conversationWorkspace al destino sin cargar su hilo, y el save en vuelo
podía escribir la revisión CAS de origen. Eso contaminaba el chat de B y
dejaba el turno sin persistir en A.

Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 4 file(s); +59/-16; React UI

Automated review from scripts/analyze_pr.py. This is a heuristic pass (no LLM) so humans still own the merge decision.

Findings

  • low — UI changed — rebuild before merge
    Run cd ui && npm run build (CI already does this). Pinokio Update rebuilds for end users; keep ui/dist untracked.

Changed files

  • modified: ui/src/features/agent/AgentAssistantPanel.tsx, ui/src/features/agent/agentKnowledge.ts, ui/src/features/agent/wizardConversationSync.ts, ui/tests/agentContract.test.mjs

CONTRIBUTING checklist

  • python scripts/verify_clean_repo.py
  • python -m compileall -q app/services app/launch.py scripts
  • cd ui && npm run build if the UI changed
  • No weights, CivitAI sidecars, or generated guides
  • Stays local-first (no required accounts / telemetry)

Posted by the repo PR review workflow. Re-runs on each push to the PR.

@IAnMove

IAnMove commented Sep 1, 2026

Copy link
Copy Markdown
Owner

cursor review

@cursor

cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown
Author

Bugbot couldn't run — GitHub account mismatch

The GitHub account linked to your Cursor account does not match the PR author.

Please ensure you're using the correct GitHub account, or run Bugbot from a team that covers this repository.

@IAnMove

IAnMove commented Sep 1, 2026

Copy link
Copy Markdown
Owner

cursor review

@cursor

cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown
Author

Bugbot couldn't run — GitHub account mismatch

The GitHub account linked to your Cursor account does not match the PR author.

Please ensure you're using the correct GitHub account, or run Bugbot from a team that covers this repository.

@IAnMove

IAnMove commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Cierre administrativo: este draft no entra en la ola actual (hotspots de Story Lab, provenance y routers). La rama cursor/critical-bug-management-4478 se conserva por si hay que recuperarlo más adelante.

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