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:
ZacharyZhang-NY committed 2026-04-16 22:51:26 -04:00
1 parent 66f5e0923d
commit d42901b86d
3 files changed
+29 -51

No files matched your search

+1 -4
View File
@@ -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,