Skip to content

fix: resolve desktop and session usability issues - #351

Merged
pedronauck merged 3 commits into
mainfrom
solve-issues
Aug 12, 2026
Merged

pedronauck merged 3 commits into
mainfrom
solve-issues

Conversation

@pedronauck

@pedronauck pedronauck commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Summary

Resolve five open desktop and session usability issues as one cross-surface change:

  • contain runtime-model scrolling inside the selector popup, including at both wheel boundaries;
  • expose operating-system filesystem roots from the daemon and make them navigable in workspace/onboarding pickers;
  • add durable, workspace-scoped user-session rename across Web, CLI, HTTP, UDS, and the native-tool surface;
  • enable standard page-zoom shortcuts only for the Tauri main window and loopback daemon origins;
  • keep tiled windows below shared resize seams while every floating window remains above them.

Root-cause fixes

Runtime selector scrolling

The model list is now the real bounded scroll owner and uses overscroll-behavior: contain, so wheel input at either end cannot escape into the desktop behind the popup.

Filesystem roots

GET /api/fs/browse now returns daemon-owned roots alongside directory entries. Unix reports /; Windows discovers logical drives through the operating system. The shared directory browser renders these roots as Locations, without browser-side path guesses or config fallbacks.

Durable session rename

Renames validate and normalize a user-session display name, enforce workspace ownership, and persist active, stopped, and archived sessions without changing identity, transcript, runtime, archive metadata, lineage, or ownership. The same contract ships through:

  • PATCH /api/workspaces/{workspace_id}/sessions/{session_id} over HTTP and UDS;
  • compozy session rename <id> <name>;
  • compozy__session_rename in the sessions toolset;
  • row actions and session topbar overflow in Web.

Generated OpenAPI/TypeScript contracts, CLI docs, native-tool catalog, and the official Compozy skill references are updated in the same commit.

Desktop page zoom

Tauri's standard WebView zoom hotkeys are enabled, with a dedicated capability restricted to the main window and loopback daemon origins. The in-product single-window Zoom action remains a separate layout command.

Window visual ordering

Visual layer is derived from semantic placement: tiled windows use layer 1, shared seams layer 2, and floating windows start above both before applying focus order. This preserves uncovered seam interaction without allowing a seam to intercept a floating window.

Verification

  • make gate-full — PASS, current full make verify record (2b4e627dce87e186362ba92cd2da74ab0a3f7736)
  • 21,519 Go tests passed under -race; 2 platform-only skips
  • Bun formatting/lint, typecheck, tests, and builds passed
  • Go lint, build, code generation, installer, product-language, source-size, and boundaries passed
  • strict targeted QA evidence audit passed
  • isolated QA teardown passed with clean: true

Real-user QA walked all five changed journeys in Web, CLI, API, runtime, and the native desktop shell. Evidence and debriefs are recorded in docs/qa/reports/2026-08-11-open-issues.md.

Compozy Impact Audit

  • Native tools: added compozy__session_rename, sessions toolset membership, descriptor/catalog metadata, runtime binding, capability coverage, and contract tests; no native-tool impact for scroll, roots, desktop zoom, or visual layers after checking their registries and descriptors.
  • Extensibility and hooks: session rename is available through CLI/HTTP/UDS/native-tool extension surfaces and documented in skills/compozy/; no hook, bridge SDK, MCP sidecar, registry, or config.toml lifecycle changes. Filesystem roots extend the existing browse response without a new setting.
  • Workspace data isolation: session names remain workspace-scoped; workspace id is enforced through HTTP/UDS/core/store/Web cache invalidation, with foreign-workspace rejection tests. Filesystem roots are global host metadata and contain no workspace/session data. The other fixes are client-local presentation behavior.
  • Official Compozy skill: updated desktop, runtime-operations, and native-tools references for page zoom and session rename; no new skill entry point was needed.

Closes #341
Closes #342
Closes #344
Closes #345
Closes #346

Summary by CodeRabbit

  • New Features

    • Added session renaming through the web interface, CLI, API, and native tools.
    • Added validation for session names, including trimming and a 64-character limit.
    • Added filesystem root locations to workspace and onboarding directory browsers.
    • Enabled webview zoom keyboard shortcuts.
  • Bug Fixes

    • Improved window layering so floating windows appear correctly above tiled windows.
    • Prevented dismissal of sessions while rename or delete dialogs are active.
    • Improved cross-platform path handling and directory navigation.

@vercel

vercel Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
compozy-site Skipped Skipped Aug 12, 2026 4:46am

Request Review

@greptile-apps

greptile-apps Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Too many files changed for review (117 files, 100 file limit).

Bypass the limit by tagging @greptile-apps to review.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The pull request adds durable session renaming across the manager, APIs, CLI, native tools, built-in tools, and web UI. It also adds filesystem root discovery, desktop zoom support, window-layer ordering, and contained model-list scrolling.

Changes

Session rename

Layer / File(s) Summary
Session state and persistence
internal/session/...
Sessions support validated durable names for active and archived user sessions. Catalog persistence, events, and rollback handling are included.
API, CLI, and native tool flows
internal/api/..., internal/cli/..., internal/daemon/...
Workspace-scoped PATCH routes, CLI commands, and the session_rename native tool rename sessions.
Built-in tool registration
internal/tools/builtin/..., internal/toolmeta/...
The rename tool has identifiers, schemas, metadata, bindings, Sessions toolset registration, and tests.
Web rename controls
web/src/systems/session/..., web/src/systems/os/..., web/src/hooks/routes/...
The web UI adds rename actions, validation dialogs, pending state, cache updates, toasts, and session-window integration.

Filesystem roots

Layer / File(s) Summary
Root discovery and API response
internal/api/contract/fs.go, internal/api/core/fs_*
Directory browsing returns filesystem roots from Unix or Windows implementations.
Workspace picker integration
web/src/systems/onboarding/..., web/src/systems/workspace/..., web/src/systems/runtime/mocks/handlers.ts
Workspace pickers receive root paths and render navigable location buttons. Fixtures and path parsing support the new response field.

Desktop interaction updates

Layer / File(s) Summary
Zoom and window layering
desktop/src-tauri/..., web/src/systems/os/...
The main window enables zoom hotkeys. Window frames and resize seams use explicit visual layers.
Model-list scrolling
web/src/systems/runtime/components/runtime-selector/model-list.tsx
The model list contains overscroll and exposes a test identifier.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant WebUI
  participant RenameAPI
  participant SessionManager
  participant Catalog
  User->>WebUI: Select Rename session
  WebUI->>RenameAPI: PATCH workspace/session with name
  RenameAPI->>SessionManager: Rename workspace session
  SessionManager->>Catalog: Persist updated session
  Catalog-->>SessionManager: Persistence result
  SessionManager-->>RenameAPI: Updated session
  RenameAPI-->>WebUI: Return renamed session
  WebUI-->>User: Close dialog and refresh session data
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.04% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title references desktop and session usability, but it does not identify any of the five concrete changes in the pull request. Name the main change or grouped scope, such as model-picker scrolling, session rename, filesystem roots, zoom shortcuts, and window layering.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The changes implement the objectives for model-picker scrolling [#341], filesystem roots [#342], session rename [#344], zoom [#345], and window layering [#346].
Out of Scope Changes check ✅ Passed All listed code changes map to the five linked issues or their required contracts, tests, and integrations; no unrelated scope is evident.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch solve-issues

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 57b3f34.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (3)
web/src/systems/os/components/__tests__/os-window.test.tsx (1)

3-4: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert the seam part of the visual-layer invariant.

The test says that floating frames stay above tiled resize seams, but it renders only OsWindow and checks only frame z-index values. It does not verify OsSnapSeam or its z-[2] layer. A seam-layer regression can therefore pass. Add a seam-specific assertion to this existing canonical suite.

As per path instructions, this is a product-contract test, so a focused style or class assertion is allowed instead of a snapshot. Based on the supplied test invariant and PR objective.

Also applies to: 171-184

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/systems/os/components/__tests__/os-window.test.tsx` around lines 3 -
4, Extend the canonical visual-layer test around OsWindow to render or query the
OsSnapSeam element and assert its seam-specific z-[2] styling. Keep the existing
frame z-index assertions, adding a focused class/style check that verifies
resize seams remain below floating frames.

Source: Path instructions

desktop/src-tauri/tests/contracts.rs (1)

296-315: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Cover the builder setting, not only its permission boundary.

This test can pass if .zoom_hotkeys_enabled(true) is removed from desktop/src-tauri/src/windowing.rs Line 75 because it checks only JSON configuration. Add a focused runtime or contract check for the main-window builder, or document why the available Tauri test surface cannot observe this setting.

Based on the supplied implementation and contract-test coverage.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@desktop/src-tauri/tests/contracts.rs` around lines 296 - 315, The test should
also verify that the main-window builder enables zoom hotkeys via the windowing
implementation’s zoom configuration, not only the capability JSON. Add a focused
runtime or contract assertion tied to the main-window builder and its
zoom-hotkey setting; if Tauri’s test surface cannot observe it, document that
limitation in the test.
web/src/systems/os/lib/window-visual-layer.ts (1)

8-11: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add a minimum-layer regression test.

OsWindowFrameModel.layer has a minimum of 1, so the first floating frame renders at z-index 3, above os-snap-seam.tsx’s z-[2]. Add a windowVisualLayer test for layer: 1.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/systems/os/lib/window-visual-layer.ts` around lines 8 - 11, Add a
regression test for windowVisualLayer using a floating frame with layer: 1, and
assert it returns WINDOW_VISUAL_LAYER.seam plus 1 (the expected z-index above
the snap seam). Keep the test focused on this minimum-layer boundary and use the
existing test conventions for the function.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/api/core/handlers_test.go`:
- Around line 1053-1083: Strengthen the assertions in the “Should reject unknown
request fields” and “Should hide a session outside the route workspace” subtests
by using assertAPIErrorResponse alongside the existing status checks. Verify the
400 response identifies legacy_name as an unknown field, and verify the 404
response matches the session not found error contract; keep the Rename()
call-count assertions unchanged.

In `@internal/api/spec/registry_sessions.go`:
- Around line 47-51: Update the operation’s Responses list in the session rename
specification to include the HTTP 503 response returned when the configured
session manager lacks core.SessionRenameManager, using the appropriate error
payload and description consistent with the handler contract.

In `@internal/cli/session_test.go`:
- Around line 923-967: Wrap the test body in
internal/cli/session_test.go:923-967 in t.Run("Should rename a session and
return the updated record", ...), and call t.Parallel() inside that subtest.
Also wrap the client rename assertions in internal/cli/client_test.go:2606-2609
in a dedicated t.Run with a descriptive “Should …” name and call t.Parallel()
inside it.

In `@internal/daemon/native_tools_test.go`:
- Around line 6474-6493: Extend the “Should rename a session” test around
ToolIDSessionRename with a request targeting ws-foreign-stable, asserting
ErrToolDenied with ReasonWorkspaceAccessDenied. Track rename-call count in the
test manager and verify it does not increase for the rejected request, while
preserving the existing successful rename and target/name assertions.

In `@web/src/hooks/routes/use-session-rename-dialog.ts`:
- Around line 16-20: Update confirmRename in use-session-rename-dialog so
rejected onRename requests are no longer discarded: capture the failure in
dialog-visible error state and render it, or propagate it through the hook’s
caller, while preserving the existing success behavior that closes the dialog.

---

Nitpick comments:
In `@desktop/src-tauri/tests/contracts.rs`:
- Around line 296-315: The test should also verify that the main-window builder
enables zoom hotkeys via the windowing implementation’s zoom configuration, not
only the capability JSON. Add a focused runtime or contract assertion tied to
the main-window builder and its zoom-hotkey setting; if Tauri’s test surface
cannot observe it, document that limitation in the test.

In `@web/src/systems/os/components/__tests__/os-window.test.tsx`:
- Around line 3-4: Extend the canonical visual-layer test around OsWindow to
render or query the OsSnapSeam element and assert its seam-specific z-[2]
styling. Keep the existing frame z-index assertions, adding a focused
class/style check that verifies resize seams remain below floating frames.

In `@web/src/systems/os/lib/window-visual-layer.ts`:
- Around line 8-11: Add a regression test for windowVisualLayer using a floating
frame with layer: 1, and assert it returns WINDOW_VISUAL_LAYER.seam plus 1 (the
expected z-index above the snap seam). Keep the test focused on this
minimum-layer boundary and use the existing test conventions for the function.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1ecee5f5-2d6e-400a-8a19-e19f9eb9757e

📥 Commits

Reviewing files that changed from the base of the PR and between 7fc534a and 558654a.

⛔ Files ignored due to path filters (35)
  • desktop/src-tauri/capabilities/main-zoom.json is excluded by !**/*.json
  • desktop/src-tauri/tauri.conf.json is excluded by !**/*.json
  • docs/qa/charters/CH-add-workspace-from-root.md is excluded by !**/*.md
  • docs/qa/charters/CH-desktop-page-zoom.md is excluded by !**/*.md
  • docs/qa/charters/CH-rename-session-parity.md is excluded by !**/*.md
  • docs/qa/charters/CH-runtime-selector-scroll-boundary.md is excluded by !**/*.md
  • docs/qa/charters/CH-window-layer-seam.md is excluded by !**/*.md
  • docs/qa/journeys/J-add-workspace-by-browsing.md is excluded by !**/*.md
  • docs/qa/journeys/J-desktop-attach-daily.md is excluded by !**/*.md
  • docs/qa/journeys/J-rename-session.md is excluded by !**/*.md
  • docs/qa/reports/2026-08-11-open-issues.md is excluded by !**/*.md
  • docs/qa/scenarios/APP-desktop-page-zoom.md is excluded by !**/*.md
  • docs/qa/scenarios/ET-window-manager-layout-gestures.md is excluded by !**/*.md
  • docs/qa/scenarios/MS-051.md is excluded by !**/*.md
  • docs/qa/scenarios/MS-web-workspace-add-directory-browser.md is excluded by !**/*.md
  • docs/qa/scenarios/RT-038.md is excluded by !**/*.md
  • docs/qa/scenarios/RT-068.md is excluded by !**/*.md
  • docs/qa/scenarios/RT-session-rename-durable.md is excluded by !**/*.md
  • internal/tools/builtin/testdata/native-tool-catalog.json is excluded by !**/*.json
  • openapi/compozy.json is excluded by !**/*.json
  • packages/site/content/docs/cli/session/index.mdx is excluded by !**/*.mdx
  • packages/site/content/docs/cli/session/meta.json is excluded by !**/*.json
  • packages/site/content/docs/cli/session/rename.mdx is excluded by !**/*.mdx
  • skills/compozy/references/desktop.md is excluded by !**/*.md
  • skills/compozy/references/native-tools.md is excluded by !**/*.md
  • skills/compozy/references/runtime-operations.md is excluded by !**/*.md
  • web/e2e/__tests__/os-shell.spec.ts is excluded by !web/e2e/**
  • web/e2e/__tests__/session-provider-override.spec.ts is excluded by !web/e2e/**
  • web/e2e/__tests__/workspace-setup.spec.ts is excluded by !web/e2e/**
  • web/src/generated/compozy-openapi.d.ts is excluded by !**/generated/**, !**/generated/**, !**/*.d.ts
  • web/src/systems/agent/components/stories/agent-sessions-list.stories.tsx is excluded by !**/*.stories.tsx
  • web/src/systems/onboarding/components/stories/directory-browser.stories.tsx is excluded by !**/*.stories.tsx
  • web/src/systems/os/components/stories/attention-surfaces.stories.tsx is excluded by !**/*.stories.tsx
  • web/src/systems/session/components/stories/session-sidebar.stories.tsx is excluded by !**/*.stories.tsx
  • web/src/systems/workspace/components/stories/workspace-setup.stories.tsx is excluded by !**/*.stories.tsx
📒 Files selected for processing (79)
  • desktop/src-tauri/src/windowing.rs
  • desktop/src-tauri/tests/contracts.rs
  • internal/api/contract/fs.go
  • internal/api/contract/session_runtime_payloads.go
  • internal/api/core/fs_browse.go
  • internal/api/core/fs_browse_test.go
  • internal/api/core/fs_roots_unix.go
  • internal/api/core/fs_roots_windows.go
  • internal/api/core/handlers_test.go
  • internal/api/core/session_rename.go
  • internal/api/core/session_rename_interfaces.go
  • internal/api/core/test_helpers_test.go
  • internal/api/httpapi/handlers_test.go
  • internal/api/httpapi/session_routes.go
  • internal/api/spec/paths.go
  • internal/api/spec/registry_filesystem.go
  • internal/api/spec/registry_sessions.go
  • internal/api/testutil/session_stub.go
  • internal/api/udsapi/handlers_test.go
  • internal/api/udsapi/session_routes.go
  • internal/cli/client_session_api.go
  • internal/cli/client_session_rename.go
  • internal/cli/client_session_types.go
  • internal/cli/client_test.go
  • internal/cli/helpers_test.go
  • internal/cli/session_command.go
  • internal/cli/session_rename.go
  • internal/cli/session_test.go
  • internal/daemon/native_session_rename.go
  • internal/daemon/native_tool_binding_groups.go
  • internal/daemon/native_tools_test.go
  • internal/session/manager_transition.go
  • internal/session/manager_transition_test.go
  • internal/session/session_rename.go
  • internal/toolmeta/native_entries.go
  • internal/toolmeta/registry_test.go
  • internal/tools/builtin/builtin_test.go
  • internal/tools/builtin/session_rename.go
  • internal/tools/builtin/sessions.go
  • internal/tools/builtin/toolsets.go
  • internal/tools/builtin_ids.go
  • web/src/hooks/routes/__tests__/use-session-page-controls.test.tsx
  • web/src/hooks/routes/use-session-page-controls.ts
  • web/src/hooks/routes/use-session-rename-dialog.ts
  • web/src/systems/agent/components/__tests__/agent-sessions-list.test.tsx
  • web/src/systems/onboarding/components/__tests__/directory-browser.test.tsx
  • web/src/systems/onboarding/components/directory-browser.tsx
  • web/src/systems/onboarding/components/step-workspaces.tsx
  • web/src/systems/onboarding/hooks/__tests__/use-onboarding-workspaces.test.tsx
  • web/src/systems/onboarding/hooks/use-onboarding-workspaces.ts
  • web/src/systems/onboarding/mocks/setup-fixtures.ts
  • web/src/systems/os/apps/agents/agent-detail-location.tsx
  • web/src/systems/os/apps/agents/use-agent-detail.ts
  • web/src/systems/os/apps/session/session-window-content.tsx
  • web/src/systems/os/apps/session/use-session-window-controller.tsx
  • web/src/systems/os/apps/session/use-session-window-sidebar.ts
  • web/src/systems/os/components/__tests__/os-window.test.tsx
  • web/src/systems/os/components/__tests__/sessions-modal.test.tsx
  • web/src/systems/os/components/desktop-shell.tsx
  • web/src/systems/os/components/os-snap-seam.tsx
  • web/src/systems/os/components/os-window.tsx
  • web/src/systems/os/lib/window-visual-layer.ts
  • web/src/systems/runtime/components/runtime-selector/model-list.tsx
  • web/src/systems/runtime/mocks/handlers.ts
  • web/src/systems/session/adapters/__tests__/session-api.test.ts
  • web/src/systems/session/adapters/session-api.ts
  • web/src/systems/session/components/__tests__/session-rename-dialog.test.tsx
  • web/src/systems/session/components/session-rename-dialog.tsx
  • web/src/systems/session/components/session-row-actions.tsx
  • web/src/systems/session/hooks/__tests__/use-session-actions.test.tsx
  • web/src/systems/session/hooks/__tests__/use-session-topbar-slot.test.tsx
  • web/src/systems/session/hooks/use-session-actions.ts
  • web/src/systems/session/hooks/use-session-lifecycle-actions.ts
  • web/src/systems/session/hooks/use-session-topbar-slot.tsx
  • web/src/systems/session/index.ts
  • web/src/systems/session/types.ts
  • web/src/systems/workspace/components/__tests__/workspace-setup.test.tsx
  • web/src/systems/workspace/components/workspace-setup-location-pane.tsx
  • web/src/systems/workspace/hooks/use-workspace-setup-content.ts

Comment thread internal/api/core/handlers_test.go
Comment thread internal/api/spec/registry_sessions.go
Comment thread internal/cli/session_test.go
Comment thread internal/daemon/native_tools_test.go
Comment thread web/src/hooks/routes/use-session-rename-dialog.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
web/src/hooks/routes/__tests__/use-session-page-controls.test.tsx (1)

392-420: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move the dialog-hook tests to the canonical hook suite.

Lines 393-420 test useSessionRenameDialog, but this suite owns useSessionPageControls. Move these tests to web/src/hooks/routes/__tests__/use-session-rename-dialog.test.tsx.

As per coding guidelines, “Before adding a Vitest or Playwright test, identify the invariant, owning layer, and canonical suite; update existing route, hook, component, story, or E2E suites first.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/hooks/routes/__tests__/use-session-page-controls.test.tsx` around
lines 392 - 420, Move the useSessionRenameDialog test block from the
use-session-page-controls suite into the canonical
use-session-rename-dialog.test.tsx suite. Preserve both failure and
successful-rename assertions unchanged, and remove the duplicated tests from the
useSessionPageControls suite.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@web/src/hooks/routes/__tests__/use-session-page-controls.test.tsx`:
- Around line 392-420: Move the useSessionRenameDialog test block from the
use-session-page-controls suite into the canonical
use-session-rename-dialog.test.tsx suite. Preserve both failure and
successful-rename assertions unchanged, and remove the duplicated tests from the
useSessionPageControls suite.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 94e4c871-852e-4949-8182-ba7e4ef9d5d4

📥 Commits

Reviewing files that changed from the base of the PR and between 558654a and 02f2318.

⛔ Files ignored due to path filters (5)
  • docs/qa/bugs/BUG-20260812-rename-dialog-double-escape.md is excluded by !**/*.md
  • docs/qa/reports/2026-08-12-pr-351-review-round-1.md is excluded by !**/*.md
  • docs/qa/scenarios/RT-session-rename-durable.md is excluded by !**/*.md
  • openapi/compozy.json is excluded by !**/*.json
  • web/src/generated/compozy-openapi.d.ts is excluded by !**/generated/**, !**/generated/**, !**/*.d.ts
📒 Files selected for processing (16)
  • desktop/src-tauri/tests/contracts.rs
  • internal/api/core/handlers_test.go
  • internal/api/spec/registry_sessions.go
  • internal/cli/client_test.go
  • internal/cli/session_test.go
  • internal/daemon/native_tools_test.go
  • web/src/hooks/routes/__tests__/use-session-page-controls.test.tsx
  • web/src/hooks/routes/use-session-rename-dialog.ts
  • web/src/systems/os/apps/session/session-window-content.tsx
  • web/src/systems/os/components/__tests__/os-window.test.tsx
  • web/src/systems/os/components/os-snap-seam.tsx
  • web/src/systems/os/lib/window-visual-layer.ts
  • web/src/systems/session/components/__tests__/session-rename-dialog.test.tsx
  • web/src/systems/session/components/session-rename-dialog.tsx
  • web/src/systems/session/hooks/__tests__/use-session-topbar-slot.test.tsx
  • web/src/systems/session/hooks/use-session-topbar-slot.tsx
🚧 Files skipped from review as they are similar to previous changes (8)
  • desktop/src-tauri/tests/contracts.rs
  • internal/cli/session_test.go
  • internal/cli/client_test.go
  • web/src/systems/os/apps/session/session-window-content.tsx
  • internal/api/spec/registry_sessions.go
  • web/src/systems/os/lib/window-visual-layer.ts
  • internal/daemon/native_tools_test.go
  • internal/api/core/handlers_test.go

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 12, 2026
@pedronauck
pedronauck merged commit 452c3d1 into main Aug 12, 2026
17 of 18 checks passed
@pedronauck
pedronauck deleted the solve-issues branch August 12, 2026 04:52

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
web/src/hooks/routes/__tests__/use-session-rename-dialog.test.tsx (1)

38-39: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Make the error assertion cover a real retry.

result.current.error is null when this test starts. The test never creates a previous failure, so Line 39 cannot detect a stale error after a failed rename. First reject one rename, then resolve a second rename, and assert that the dialog closes with error set to null.

The hook contract in web/src/hooks/routes/use-session-rename-dialog.ts Lines 12-46 requires this failed-then-successful transition.

Example retry setup
-    const { result } = renderHook(() => useSessionRenameDialog(() => rename.promise));
+    const onRename = vi.fn()
+      .mockRejectedValueOnce(new Error("Rename unavailable."))
+      .mockReturnValueOnce(rename.promise);
+    const { result } = renderHook(() => useSessionRenameDialog(onRename));

     act(() => result.current.openDialog());
     act(() => result.current.confirmRename("Release review"));
+    await waitFor(() => expect(result.current.error).toBe("Rename unavailable."));
+    expect(result.current.open).toBe(true);
+    act(() => result.current.confirmRename("Release review"));
+    expect(result.current.open).toBe(true);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/hooks/routes/__tests__/use-session-rename-dialog.test.tsx` around
lines 38 - 39, Update the test around the useSessionRenameDialog hook to
exercise a failed-then-successful rename: make the first rename reject, assert
the failure state, then make a second rename resolve and verify the dialog
closes with result.current.error reset to null. Preserve the existing initial
closed and error-free assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@web/src/hooks/routes/__tests__/use-session-rename-dialog.test.tsx`:
- Around line 38-39: Update the test around the useSessionRenameDialog hook to
exercise a failed-then-successful rename: make the first rename reject, assert
the failure state, then make a second rename resolve and verify the dialog
closes with result.current.error reset to null. Preserve the existing initial
closed and error-free assertions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 11d77c95-5d2d-44bd-bfea-86325aa361da

📥 Commits

Reviewing files that changed from the base of the PR and between 02f2318 and 57b3f34.

📒 Files selected for processing (2)
  • web/src/hooks/routes/__tests__/use-session-page-controls.test.tsx
  • web/src/hooks/routes/__tests__/use-session-rename-dialog.test.tsx
💤 Files with no reviewable changes (1)
  • web/src/hooks/routes/tests/use-session-page-controls.test.tsx

This branch was previously deployed

1 inactive deployment
Preview — 57b3f345 Deployed Aug 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant