* fix(app): focus explicitly opened workspace tabs Explicit tab navigation could be overwritten by attention-aware workspace navigation when the visible agent had just finished. Make workspace navigation own both normal attention selection and explicit targets so callers cannot sequence them inconsistently. * test(app): strengthen forked tab focus assertion
20 lines
580 B
TypeScript
20 lines
580 B
TypeScript
import { useWorkspaceLayoutStore } from "@/stores/workspace-layout-store";
|
|
import {
|
|
prepareWorkspaceTab as prepareWorkspaceTabPure,
|
|
type PrepareWorkspaceTabInput,
|
|
} from "./prepare-workspace-tab";
|
|
|
|
export type { PrepareWorkspaceTabInput } from "./prepare-workspace-tab";
|
|
|
|
function layoutStoreDeps() {
|
|
const store = useWorkspaceLayoutStore.getState();
|
|
return {
|
|
openTabFocused: store.openTabFocused,
|
|
pinAgent: store.pinAgent,
|
|
};
|
|
}
|
|
|
|
export function prepareWorkspaceTab(input: PrepareWorkspaceTabInput): void {
|
|
prepareWorkspaceTabPure(input, layoutStoreDeps());
|
|
}
|