fix(layout): auto-réparer l'onglet actif
stale
Le backend renvoie l'id actif autoritaire et le
frontend l'adopte pour éviter de rejouer un layout
disparu après overwrite externe.
Co-Authored-By: Claude Opus 4.8
<noreply@anthropic.com>
This commit is contained in:
@ -375,8 +375,14 @@ export interface LayoutGateway {
|
||||
renameLayout(projectId: string, layoutId: string, name: string): Promise<void>;
|
||||
/** Deletes a layout; returns the new active layout id. */
|
||||
deleteLayout(projectId: string, layoutId: string): Promise<{ activeId: string }>;
|
||||
/** Sets the active layout for a project. */
|
||||
setActiveLayout(projectId: string, layoutId: string): Promise<void>;
|
||||
/**
|
||||
* Sets the active layout for a project. Returns the layout id the backend
|
||||
* *actually* activated — authoritative (invariant I4): it equals the requested
|
||||
* id when valid, else the unchanged current active id (self-healing fallback
|
||||
* when the requested id was stale, e.g. after an external overwrite of
|
||||
* `layouts.json`). Callers must adopt this id rather than the one they asked for.
|
||||
*/
|
||||
setActiveLayout(projectId: string, layoutId: string): Promise<{ activeId: string }>;
|
||||
}
|
||||
|
||||
/** Git: status/commit/checkout/… (L8). */
|
||||
|
||||
Reference in New Issue
Block a user