refactor(renderer): consolidate navigateTo into navigation slice (P1-11)
Delete the useUIController.navigateTo duplicate; augment slice version with task-with-run lookup (via get().snapshot) so notification-click and command palette share one codepath. App.tsx now reads navigateTo from the store.
This commit is contained in:
1 parent
66f5e0923d
commit
d42901b86d
3 files changed
+29
-51
No files matched your search
@@ -23,6 +23,7 @@ export function App() {
|
||||
const setError = useAppStore((s) => s.setError);
|
||||
const setSelectedRunId = useAppStore((s) => s.setSelectedRunId);
|
||||
const setConsoleOpen = useAppStore((s) => s.setConsoleOpen);
|
||||
const navigateTo = useAppStore((s) => s.navigateTo);
|
||||
|
||||
const showCustomTitleBar = window.agentCompany.platform !== "darwin";
|
||||
const isMac = !showCustomTitleBar;
|
||||
@@ -77,10 +78,6 @@ export function App() {
|
||||
[paletteActions],
|
||||
);
|
||||
|
||||
const navigateTo = useCallback((targetSection: Parameters<typeof ui.navigateTo>[0], entityId?: string) => {
|
||||
ui.navigateTo(targetSection, entityId, company.runs, company.tasks);
|
||||
}, [ui, company.runs, company.tasks]);
|
||||
|
||||
useCommandPaletteHotkeys({
|
||||
commandPaletteOpen: ui.commandPaletteOpen,
|
||||
setCommandPaletteOpen: ui.setCommandPaletteOpen,
|
||||
|
||||
Reference in new issue
Block a user