Skip to content

feat(ui): path-based agent and panel URLs on Settings > Agents - #115673

Merged
steipete merged 7 commits into
mainfrom
steipete/agents-panel-path-urls
Jul 29, 2026
Merged

steipete merged 7 commits into
mainfrom
steipete/agents-panel-path-urls

Conversation

@steipete

@steipete steipete commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Settings → Agents selected an agent through ?agent=<id>, while the per-agent Overview, Files, Tools, Skills, Channels, Automations, and Memory panels existed only in component state. Agent panels could not be bookmarked or shared, and browser Back could not walk selection history.

Why This Change Was Made

This adds canonical agent paths under /settings/agents/<agentId> and explicit panel paths under /settings/agents/<agentId>/<panel>. The route loader remains the owner of roster fallback, while the page derives its active panel from route data instead of maintaining parallel panel state. Agent and panel user selections push paths; Back restores the prior route-owned selection.

Legacy ?agent= links perform one replacement to the path form while preserving unrelated query parameters and fragments. Unknown agent ids retain the explicit URL while rendering the roster fallback, matching shipped query-link behavior. Unknown panel segments normalize once to the agent's default-panel path. Agent ids are encoded as path segments and malformed, slash-containing, or exact dot-segment ids are rejected.

AI-assisted implementation; the routing boundary, fallback behavior, tests, and live browser history were reviewed directly.

User Impact

Users can bookmark and share a specific agent panel, navigate between agents and panels with useful browser history, and continue opening existing ?agent= links without losing other URL state.

Evidence

Focused Control UI proof on the rebased head:

Route and path group: 5 files passed, 53 tests
Agents page/sidebar group: 3 files passed, 233 tests
Total focused UI: 8 files, 286 tests

Focused browser E2E:
ui/src/e2e/agent-model-fallback-ownership.e2e.test.ts
ui/src/e2e/agent-page-scope.e2e.test.ts
2 files passed, 7 tests

The multi-agent browser E2E starts on Main/Tools, selects Writer, proves /settings/agents/writer/tools, selects Overview, and proves /settings/agents/writer/overview. The sidebar Agent settings handoff proves /settings/agents/writer with no legacy query.

Exact-head browser proof with pnpm dev:ui:mock --port=5203 and pre-load history.pushState / history.replaceState spies:

Start/action Selected agent/panel History result Final URL
/settings/agents main / Files 0 push, 0 replace /settings/agents
/settings/agents/main/tools main / Tools 0 push, 0 replace unchanged
/settings/agents?agent=main&probe=1#agents main / Files 0 push, 1 replace /settings/agents/main?probe=1#agents
/settings/agents/main/unknown?probe=1#agents main / Files 0 push, 1 replace /settings/agents/main?probe=1#agents
/settings/agents/missing/memory fallback main / Memory 0 push, 0 replace unchanged
Click Tools from /settings/agents/main main / Tools 1 push /settings/agents/main/tools
Browser Back main / Files no additional write /settings/agents/main
/settings/agents/agent%2Fchild Agents page rejected 1 fallback replace /chat/main

The standard mock exposes one agent, so cross-agent clicking is fixture-blocked in that source-blind run; the dedicated multi-agent browser E2E above covers that clause.

Static and review gates:

./node_modules/.bin/oxfmt <all 20 touched files>
./node_modules/.bin/oxlint <all touched TypeScript files>
git diff --check origin/main...HEAD

.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --engine codex --model gpt-5.6-sol --thinking high
autoreview clean: no accepted/actionable findings reported
overall: patch is correct (0.91)

Autoreview's exact dot-segment finding was accepted and fixed. Its suggestion to rewrite unknown agent ids to the fallback agent was rejected because the requested compatibility contract is to fall back like shipped ?agent= links; that invariant is documented and covered by route and live-browser tests.

There is no visual styling delta; the address-bar path, selected agent/panel, and history operations are the relevant before/after evidence.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels Jul 29, 2026
@steipete
steipete marked this pull request as ready for review July 29, 2026 06:23
@steipete
steipete force-pushed the steipete/agents-panel-path-urls branch 2 times, most recently from 5d51909 to 58c19e9 Compare July 29, 2026 07:02
@steipete steipete self-assigned this Jul 29, 2026
@steipete steipete closed this Jul 29, 2026
@steipete steipete reopened this Jul 29, 2026
@steipete steipete closed this Jul 29, 2026
@steipete steipete reopened this Jul 29, 2026
@steipete
steipete force-pushed the steipete/agents-panel-path-urls branch from 7523a78 to 6d92c93 Compare July 29, 2026 07:39
@steipete
steipete force-pushed the steipete/agents-panel-path-urls branch from 6d92c93 to de4b750 Compare July 29, 2026 07:52
@steipete
steipete merged commit a2c88e2 into main Jul 29, 2026
97 checks passed
@steipete
steipete deleted the steipete/agents-panel-path-urls branch July 29, 2026 08:12
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 29, 2026
* origin/main: (100 commits)
  fix(hooks): kill gog process tree on gmail-watcher shutdown (#112452)
  fix(memory): avoid phantom continuation pages (#115722)
  fix(agents): reject cancelled foreground commands (#115694)
  fix(telegram): prevent false empty replies after message-tool delivery (#115588)
  refactor: unify session cost rollup scans (#115749)
  fix(agents): honor completed semantic command exits (#115737)
  feat(agents): persist last-used session model as the agent default (#115717)
  feat(openai): support GPT-Live over backend WebSocket (#115622)
  fix(ui): unify sidebar thread density (#115646)
  feat(ui): path-based agent and panel URLs on Settings > Agents (#115673)
  feat(gateway): serve HTTP byte ranges on media routes (#115667)
  refactor: consolidate Teams and Zoom meeting plugin shells (#115707)
  fix(browser): release unread CDP response streams (#115675)
  feat(ui): move settings save feedback into the sidebar footer (#115679)
  fix(plugins): enforce hook security invariants (#115701)
  refactor: deduplicate extension normalization primitives (#115650)
  feat(gateway): add least-privilege voice-node pairing (#115712)
  fix(ui): restore in-flight assistant replies after reconnect (#115691)
  fix(whatsapp): infer native media from filenames (#115725)
  fix(system-agent): avoid TUI startup catalog preparation (#113136)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
…law#115673)

* feat(ui): add agent panel path URLs

* test(ui): clarify unknown agent route fallback

* fix(ui): reject agent URL dot segments

* test(ui): clarify agent panel switch proof

* chore(ui): localize panel id table and refresh docs map

* test(ui): keep agent panel cases test-local

* chore(ui): keep agent route path type local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant