From 2502c3380468b8b3ec6f214a1a49cdf0b20f39db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Fri, 7 Aug 2026 11:38:21 +0000 Subject: [PATCH] put the settings section in the url MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Five settings pages moved from a `*_SELECTED` global to `/settings/:page/:section`. The sidebar entry is a react-router `` rather than a button holding the key in its onClick closure, so a section is linkable, cmd-clickable and gets its active state from the router; each page renders one `SettingsRoute` guard that canonicalises both the bare route and a section that does not exist. Integrations needed more than the shared factory. It builds its own sidebar, and it kept the Enterprise/Personal tab in a second global — which is why a deep link to a Personal section could never have worked: the link set the section, the tab stayed on Enterprise, and the content pane said "Select a section" about a section that existed. The tab is derived from the section key now. Also removes the `/settings/resources` menu item (audit M8) and its two locale keys: there has never been such a route, so it bounced to the catch-all and out to `/`. --- docs/navigation-audit.md | 14 +-- docs/workspace-panel-todo.md | 13 +++ src/apps/officer-web/App.tsx | 9 ++ .../Dashboard/Layout/Header/UserMenu.tsx | 11 +- .../Screens/Dashboard/Settings/AISettings.tsx | 16 +-- .../Settings/IntegrationsSettings/index.tsx | 45 +++++--- .../Settings/ProfileSettings/index.tsx | 14 +-- .../Dashboard/Settings/SettingsPanel.tsx | 100 ++++++++++-------- .../Dashboard/Settings/SystemSettings.tsx | 16 +-- .../Settings/UserManagement/index.tsx | 14 ++- src/apps/officer-web/locales/en.json | 1 - src/apps/officer-web/locales/pt.json | 1 - 12 files changed, 155 insertions(+), 99 deletions(-) diff --git a/docs/navigation-audit.md b/docs/navigation-audit.md index 78d97856..7837d581 100644 --- a/docs/navigation-audit.md +++ b/docs/navigation-audit.md @@ -37,7 +37,10 @@ That fix is the template for the HIGH items below. **Caveat:** the fix only did **Existing entity routes:** `/chat/:sessionId`, `/jobs/:id`, `/dashboards/:id`, `/projects/:id`, `/email/:emailId`. **Flat screens:** `/` `/files` `/music` `/soulseek` `/tasks` `/skills` `/processes` `/activity` -`/system-monitor` `/task-logs` `/plans` `/terminal` `/desktop` `/browser` `/code-editor` `/settings/{profile,ai,system,integrations,apps}`. +`/system-monitor` `/task-logs` `/plans` `/terminal` `/desktop` `/browser` `/code-editor`. +The five settings pages are route **pairs** now, not flat screens — `/settings/{profile,ai,system,integrations,user-management}` +plus a `:section` each (M6). There has never been a `/settings/apps`; that entry was wrong when this list +was written. **What's already correct** (lean on these in the refactor): the **Dock**, **Header** (logo + mobile sheet), **UserMenu**, **JobsIndicator** are all real ``s. Shared `NavLink.tsx` (query-string-appending `` @@ -72,9 +75,9 @@ are good building blocks. The **Workspace/Panel framework** contains **zero** ro | M3 | `Screens/Dashboard/Activity/ActivityScreen.tsx:63,73` | background task / detached job | `/activity/:id` | two row types; unify under one param, screen re-derives `task=`/`path=`. | | M4 | `FileBrowser/.../useFileBrowserApp.ts:269`, `FileItem.tsx:516`, `Breadcrumb.tsx:16`, search-hit `:249` | a folder | `/files?path=` | **files** already open via `?view=`; **folders** are pure `currentPath` state — no URL, no back/forward. Folder rows + crumbs → `` on a `?path=` param. | | M5 | `CodeEditor/FileTree.tsx:59`, `EditorTabs.tsx:33` | open source file / active tab | `/code-editor?file=` (+ `open=` for tabs) | tree file rows → ``; active file in a param. | -| M6 | `Layout/Settings/SettingsPanel.tsx:39` | a settings sub-section | `/settings/:page/:section` or `?section=` | `