Skip to content

[feat] Reorganize the navigation rail to the Sidebar - #6738

Merged
ashrafchowdury merged 26 commits into
feat/mobile-automationsfrom
feat/sidebar-reorg-v2
Sep 11, 2026
Merged

[feat] Reorganize the navigation rail to the Sidebar#6738
ashrafchowdury merged 26 commits into
feat/mobile-automationsfrom
feat/sidebar-reorg-v2

Conversation

@ashrafchowdury

Copy link
Copy Markdown
Contributor

Context

The navigation rail had drifted from the Sidebar Reorg design (option 1b in the Claude Design project). Rows were 28px at 14px where the design draws 26px at 13px, the brand row took 48px for what is an 18px wordmark, and session rows sat behind a 22px indent and a vertical guide line. That indent pushed every status dot out of the column the Home, Agents and Sessions icons share, so the rail read as two lists that did not line up.

Three things were also in the wrong place. The changelog shipped as sidebar banner cards you dismissed one at a time. Help and Docs took a full-width row in the footer, the widest thing there. And the Sessions group had its own filter popover, written before the shared one existed, so the automations list and the rail drew the same control two different ways.

Stacked on feat/mobile-home-focus, so the base is that branch and this PR shows only its own commit. It replaces #6715, which was opened against a base that has since been rewritten.

Changes

Density. Rows are 26px at 13px, the brand row is 32px with an 80x18 wordmark, and session titles drop to 12px with 10px status glyphs, so the session pane reads as a list under the nav rather than as more nav.

Session rows line up with the nav. The guide line and the 22px indent are gone for groups that carry no collapse control. Keyed on alwaysOpen rather than on the Sessions key: a group you cannot collapse is a section of the rail, and its rows are rail rows. The Evaluation group, which you do open, keeps its indent and its line.

Agents is a plain row. Its dynamic child list is gone. An agent list in the rail was a second, shorter answer to a question the Agents page already answers in full, and the caret it needed made the row look like the Sessions group, which is the rail's only real list. That removed the last caller of sidebarAgentRanksAtomFamily, so it goes too, along with withManualAgentRanks and the agents drag zone behind it. The agent headings under Sessions keep their own separate zone and their own counts.

Releases leave the banner queue and read as a "What's new?" list inside the help menu. A release is news, not a task: it does not need clearing, and eleven of them queued two at a time made it feel like one. The queue keeps star-repo and the trial/upgrade banners EE injects, which are tasks.

Help becomes an icon button on the switcher row, drawing the same flyout the collapsed rail draws. Book a call comes out and Keyboard shortcuts takes its place, which gives the shortcuts sheet a visible way in. It had been reachable only through a bare ? hotkey.

Session search. A magnifier beside the filter opens a palette backed by a debounced server search. Filtering the rail's own fifty-row window would search the top of the list and call everything else missing, which is the one case a search exists for.

The rail's filter uses the shared menu. SessionFilterMenu went from 220 lines to a section map over @agenta/ui/filter-menu, the same panel the automations list opens, and the superseded presentational/filter/FilterMenu is deleted. This was its last caller.

Empty states say less. An alwaysOpen group renders nothing at all when its source is ready with no rows, instead of "No sessions yet" under a heading that already says Sessions, and the filter control hides with it. A filter that matched nothing still speaks, because that state is one you have to act on, and the filter stays so you can widen it again. Placeholder lines render as prose rather than as rows, so they stop looking like broken sessions.

Dark selection stops shouting. The selected row painted an olive wash with accent-yellow text and no ring, the loudest thing on a rail whose job is to sit still, and it disagreed with light. One rule in both themes now: a raised surface, a hairline, and the text left alone.

Before (dark): bg #57572a, text #d1d151, no ring
After (dark): bg #242424 on the #101010 rail, text rgba(255,255,255,0.85), ring #292929

Changed at the source in palette.ts with the tokens regenerated.

Tests

  • tsc --noEmit clean on oss and mobile; eslint clean across the touched packages.
  • pnpm --filter @agenta/navigation test: 82 pass. Down from 86 because the four withManualAgentRanks cases described a helper that no longer exists.
  • Verified against the running app on /m throughout, measuring geometry in the DOM rather than by eye: session glyphs and nav icons both at left: 20px, brand row exactly 32px, collapsed icons 28px with 4px between them, and the rail's right-hand controls sharing one centre line at 237px.

Four defects were found and fixed during review rather than shipped. NavMenu composed row classes with clsx, so a session row's text-[12px] lost to ROW_BASE's text-[13px] on stylesheet order (both row renderers now use cn). The ported Agent filter row never checked "All agents", which is its default state. Nav rows compressed below h-[26px] when the rail overflowed, because they could shrink and the scrolling group did not absorb it. And a group heading needed two clicks to toggle: a press that drifted past the 5px drag threshold armed a drag whose click was then suppressed even though nothing moved, so the suppression now needs the order to change or the pointer's peak travel to pass 12px.

One thing a reviewer should weigh: hideWhenEmpty is safe only on a group with no collapse control, and nothing enforces that. Set it on a collapsible entity and the group deadlocks, because empty children strip the caret, the key is never published as open, and the gated source can never fetch the rows that would bring the caret back. The constraint currently lives in a doc comment.

Demo

Outstanding for the desktop rail. Every shared component was verified against the running mobile app on /m, which mounts the same SidebarShell, NavMenu, ProjectOrgSwitcher, filter menu and help menu, but I could not capture the desktop app on this branch. Worth a look there before merge.

What to QA

  • Open the rail on desktop. Session rows sit flush with the nav rows and their status dots share the icon column with Home, Agents and Sessions. No vertical guide line under Sessions.
  • Agents is a plain row with no expand caret and no agent list under it. Clicking it still lands on the agents page.
  • Click a session group heading once. It toggles on that click, including when your pointer drifts a few pixels during the press.
  • Click the magnifier on the Sessions row. Type a session name that is NOT in the rail's visible list. It should still be found, and clicking a hit opens that session the same way its rail row would.
  • Open the filter beside it. Every row shows its current value, and the Agent flyout has "All agents" checked when no agent filter is applied.
  • Narrow the filter until nothing matches. The rail says "No sessions match these filters" and the filter control stays, so you can widen it again.
  • Open a project with no sessions at all. The Sessions group is bare: no placeholder line and no filter control.
  • Open the "?" button next to the project switcher. The menu reads Documentation, GitHub, Slack, Keyboard shortcuts, then "What's new?" over three releases and "View all releases" with the version. Keyboard shortcuts opens the shortcuts sheet.
  • Switch to dark. The selected nav row is a quiet raised pill with a hairline, not an olive wash with yellow text.
  • Collapse the rail. Icons are 28px with even spacing, and Settings, "?" and the project avatar step evenly at the bottom.
  • Shrink the window until the rail overflows. The nav rows hold their height and the Sessions group scrolls.
  • Regression, EE only: the trial and upgrade banners still appear in the rail. Only the changelog cards left that queue.
  • Regression, /m: the mobile drawer and docked rail share every one of these components. Check the nav, the session list and the switcher there too.

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
agenta-documentation Ready Ready Preview Sep 11, 2026 2:22pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Summary

Summary by CodeRabbit

  • New Features

    • Added searchable session lookup from the Sessions sidebar, including loading and empty states.
    • Added keyboard shortcuts access through Help menus on desktop and mobile.
    • Added a “What’s new?” section with recent releases and a link to all releases.
    • Added session filtering and automatic hiding of empty session groups.
  • Improvements

    • Updated sidebar layout, spacing, controls, and dark-mode selected-item styling.
    • Simplified mobile navigation and removed the separate Agents navigation section.
    • Improved drag-and-drop behavior to preserve clicks after minor pointer movement.
    • Removed the “Book a call” Help menu option.

Walkthrough

The sidebar now uses shared release navigation, session search, keyboard shortcuts, and help menus across web and mobile. The standalone Agents entity and changelog banners were removed. Navigation sizing, selected colors, filtering, and drag-click handling were updated.

Changes

Sidebar navigation update

Layer / File(s) Summary
Navigation model and release data
web/packages/agenta-navigation/..., web/packages/agenta-navigation/tests/...
Sessions can hide when empty. The standalone Agents entity and manual agent ranking were removed. Releases now appear in help navigation instead of banners.
Session search and filtering
web/packages/agenta-navigation/src/dynamic/sessionsSource.ts, web/packages/agenta-navigation-ui/src/SessionSearch*.tsx, web/packages/agenta-navigation-ui/src/SessionFilterMenu.tsx, web/packages/agenta-ui/src/components/presentational/filter/*
Debounced server-backed session search, search controls, result rendering, and shared filter sections were added. The previous filter component was removed.
Help actions and navigation rendering
web/mobile/src/features/nav/*, web/oss/src/components/Sidebar/*, web/packages/agenta-navigation-ui/src/NavMenu.tsx, web/packages/agenta-navigation-ui/src/ProjectOrgSwitcher.tsx
Help menus, release items, keyboard shortcuts, mobile navigation, sidebar flyouts, and project switcher trailing controls were integrated.
Navigation interaction and visual polish
web/packages/agenta-navigation-ui/src/{reorder,SidebarLogo.tsx,SidebarShell.tsx,SidebarToggleButton.tsx}, web/oss/src/styles/theme/palette.ts, web/packages/agenta-ui/src/styles/theme-variables.css, web/packages/agenta-sessions-ui/src/SessionRowActions.tsx
Drag click suppression now uses peak pointer travel. Sidebar dimensions, selected-row colors, logo sizing, toggle sizing, support links, and session action alignment were adjusted.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: 🔵 Low · up to 55992

One small repository-policy issue remains in a sidebar source comment; runtime navigation behavior is unaffected.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: reorganizing the navigation rail into the Sidebar design.
Description check ✅ Passed The description directly explains the navigation rail reorganization, including density, session alignment, help and release changes, search, filtering, empty states, styling, tests, and remaining des…
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/sidebar-reorg-v2

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 Sep 9, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-pr-6738.up.railway.app/w
Project agenta-oss-clone-spike
Image tag pr-6738-1dca6a4
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-09-11T14:38:38.296Z

@ashrafchowdury ashrafchowdury changed the title [feat] Reorganize the navigation rail to the Sidebar Reorg design [feat] Reorganize the navigation rail to the Sidebar Sep 10, 2026
@ashrafchowdury
ashrafchowdury added this pull request to stack #6736 September 10, 2026 05:28

@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: 4


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Advanced

Run ID: 39ddf9c8-c185-4b51-b0b9-a0f0a03bf703

📥 Commits

Reviewing files that changed from the base of the PR and between fc965a2 and ea15a8e.

📒 Files selected for processing (39)
  • web/mobile/src/features/nav/DrawerProjectSwitcher.tsx
  • web/mobile/src/features/nav/useMobileNavItems.tsx
  • web/oss/src/components/Sidebar/components/ProjectOrgSwitcher/index.tsx
  • web/oss/src/components/Sidebar/dynamic/useSidebarDynamicChildren.tsx
  • web/oss/src/components/Sidebar/hooks/useSidebarConfig/index.tsx
  • web/oss/src/components/Sidebar/scopes/bottomSection.tsx
  • web/oss/src/components/Sidebar/scopes/mainScope.tsx
  • web/oss/src/styles/theme/palette.ts
  • web/packages/agenta-navigation-ui/src/NavMenu.tsx
  • web/packages/agenta-navigation-ui/src/ProjectOrgSwitcher.tsx
  • web/packages/agenta-navigation-ui/src/SessionFilterMenu.tsx
  • web/packages/agenta-navigation-ui/src/SessionSearchButton.tsx
  • web/packages/agenta-navigation-ui/src/SessionSearchPalette.tsx
  • web/packages/agenta-navigation-ui/src/SidebarIconMenu.tsx
  • web/packages/agenta-navigation-ui/src/SidebarLogo.tsx
  • web/packages/agenta-navigation-ui/src/SidebarShell.tsx
  • web/packages/agenta-navigation-ui/src/SidebarToggleButton.tsx
  • web/packages/agenta-navigation-ui/src/index.ts
  • web/packages/agenta-navigation-ui/src/releaseItems.tsx
  • web/packages/agenta-navigation-ui/src/reorder/engine.ts
  • web/packages/agenta-navigation/src/banners/state.ts
  • web/packages/agenta-navigation/src/banners/types.ts
  • web/packages/agenta-navigation/src/dynamic/registry.ts
  • web/packages/agenta-navigation/src/dynamic/sessionsSource.ts
  • web/packages/agenta-navigation/src/dynamic/types.ts
  • web/packages/agenta-navigation/src/dynamic/useSidebarDynamicChildren.ts
  • web/packages/agenta-navigation/src/index.ts
  • web/packages/agenta-navigation/src/releases/changelog.json
  • web/packages/agenta-navigation/src/releases/index.ts
  • web/packages/agenta-navigation/src/reorder/applyOrder.ts
  • web/packages/agenta-navigation/src/reorder/manualOrder.ts
  • web/packages/agenta-navigation/src/supportLinks.ts
  • web/packages/agenta-navigation/tests/unit/manualOrder.test.ts
  • web/packages/agenta-navigation/tests/unit/sidebarChildren.test.ts
  • web/packages/agenta-sessions-ui/src/SessionRowActions.tsx
  • web/packages/agenta-ui/src/components/presentational/filter/FilterMenu.tsx
  • web/packages/agenta-ui/src/components/presentational/filter/index.ts
  • web/packages/agenta-ui/src/components/presentational/index.ts
  • web/packages/agenta-ui/src/styles/theme-variables.css
💤 Files with no reviewable changes (5)
  • web/packages/agenta-navigation/src/reorder/applyOrder.ts
  • web/packages/agenta-ui/src/components/presentational/index.ts
  • web/oss/src/components/Sidebar/dynamic/useSidebarDynamicChildren.tsx
  • web/packages/agenta-ui/src/components/presentational/filter/index.ts
  • web/packages/agenta-ui/src/components/presentational/filter/FilterMenu.tsx

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Comment on lines +175 to +181
const moved = !next.every((id, index) => id === state.ids[index])
// The pointerup's click dies when the gesture was really a drag: the order changed, or the
// pointer travelled far enough that nobody meant it as a click (a drag back to the origin
// must not navigate the row or toggle the heading). It does NOT die for a press that drifted
// a few pixels past DRAG_THRESHOLD_PX and landed where it started — suppressing that is what
// made a heading take two clicks to toggle.
if (moved || state.maxTravel > CLICK_TRAVEL_PX) suppressClick = true

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- engine outline ---'
ast-grep outline web/packages/agenta-navigation-ui/src/reorder/engine.ts
printf '%s\n' '--- engine excerpt ---'
sed -n '1,240p' web/packages/agenta-navigation-ui/src/reorder/engine.ts
printf '%s\n' '--- related symbols and tests ---'
rg -n --glob '!node_modules' --glob '!dist' 'endDrag|onPointerUp|CLICK_TRAVEL_PX|DRAG_THRESHOLD_PX|pointerY|maxTravel' web/packages/agenta-navigation-ui/src/reorder web/packages/agenta-navigation-ui -g '*test*' -g '*spec*' -g '*.ts' -g '*.tsx'

Repository: Agenta-AI/agenta

Length of output: 15077


🤖 get_repo_knowledge executed:

get_repo_knowledge Agenta-AI/agenta /tmp/coderabbit-repo-knowledge/agenta-ai-agenta-4b53879a/conventions /tmp/coderabbit-repo-knowledge/agenta-ai-agenta-4b53879a/learnings

Length of output: 17047


🏁 Script executed:

sed -n '1,240p' web/packages/agenta-navigation-ui/src/reorder/engine.ts

Repository: Agenta-AI/agenta

Length of output: 9133


🏁 Script executed:

#!/bin/bash
set -eu
cat -n web/packages/agenta-navigation-ui/src/reorder/engine.ts | sed -n '1,230p'
printf '%s\n' '--- tests and callers ---'
rg -n -C 4 'endDrag|onPointerUp|pointerup|CLICK_TRAVEL_PX|DRAG_THRESHOLD_PX|resolveDrop' web/packages/agenta-navigation-ui -g '*.ts' -g '*.tsx' -g '*test*' -g '*spec*'

Repository: Agenta-AI/agenta

Length of output: 21611


Update the active pointer state before resolving the drop.

endDrag(true) uses state.pointerY for the drop index and state.maxTravel for click suppression. onPointerUp ignores its PointerEvent, so final movement after the last pointermove can produce a stale drop index or click-suppression decision. Update pointerX, pointerY, and maxTravel before calling endDrag(true). Add a regression test for this case.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. onPointerUp now writes pointerX, pointerY and maxTravel from the release event before calling endDrag(true).

Worth noting the maxTravel half is on me: I added that dependency in this PR when I made click suppression depend on peak travel rather than suppressing unconditionally, so a stale value could have let a real drag's click through. The drop-index staleness predates it.

No regression test: @agenta/navigation-ui has no unit test setup (the package's tests live in @agenta/navigation, which does not contain the engine), so adding one means standing up a harness for a pointer-event integration test. I verified the two cases by driving synthetic pointer sequences against the running rail instead: a 6px drifting click toggles a group heading on the first click, and a 40px drag that returns to its origin still has its click suppressed.

Comment thread web/packages/agenta-navigation-ui/src/SessionFilterMenu.tsx Outdated
tabIndex={0}
aria-label="Search sessions"
title="Search sessions"
className="flex size-5 shrink-0 cursor-pointer items-center justify-center rounded text-colorTextTertiary hover:bg-colorFillQuaternary hover:text-colorText"

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the theme-aware focus ring. The browser ring remains visible, but the trigger has no project-defined focus state for light and dark themes. Add focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-focus-ring.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Added outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-focus-ring, matching what NavMenu's LeafRow already uses for its keyboard-reachable rows.

enabled: Boolean(projectId) && search.length > 0,
staleTime: 30_000,
// Hold the previous rows while the next keystroke resolves, so the list does not blink.
placeholderData: (previous: SessionStream[] | null | undefined) => previous,

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.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🔎 Supported by static analysis

🤖 get_repo_knowledge executed:

get_repo_knowledge Agenta-AI/agenta /tmp/coderabbit-repo-knowledge/agenta-ai-agenta-4b53879a/learnings /tmp/coderabbit-repo-knowledge/agenta-ai-agenta-4b53879a/conventions

Length of output: 17531


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- target excerpt ---'
sed -n '820,950p' web/packages/agenta-navigation/src/dynamic/sessionsSource.ts
printf '%s\n' '--- relevant symbols and imports ---'
rg -n -C 3 'sessionSearchQueryAtom|placeholderData|projectIdAtom|SessionStream|use.*Session|queryKey' web/packages/agenta-navigation/src/dynamic/sessionsSource.ts

Repository: Agenta-AI/agenta

Length of output: 13271


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- package versions and query adapter bindings ---'
rg -n -C 3 '"jotai-tanstack-query"|"`@tanstack/react-query`"|"`@tanstack/query-core`"' web/package.json web/packages/*/package.json web/pnpm-lock.yaml pnpm-lock.yaml 2>/dev/null || true
printf '%s\n' '--- search atom consumers and project switch state ---'
rg -n -C 4 'sidebarSessionSearch(Query|Open|Results|Loading)Atom|projectIdAtom' web/packages/agenta-navigation/src web/packages/agenta-navigation 2>/dev/null | head -240
printf '%s\n' '--- local query helper context ---'
sed -n '135,170p' web/packages/agenta-navigation/src/dynamic/sessionsSource.ts

Repository: Agenta-AI/agenta

Length of output: 40291


🌐 Web query:

TanStack Query v5 placeholderData function previousData previousQuery queryKey official documentation

💡 Result:

In TanStack Query v5, the placeholderData option allows a query to display specific data while it is in the pending state [1][2]. When a function is provided to placeholderData, it receives two arguments: (previousData, previousQuery) [2][3]. The function signature is: placeholderData: (previousData: TData | undefined, previousQuery: Query | undefined) => TData | undefined Arguments: 1. previousData: The data from the previously successful query, if available [2][3]. 2. previousQuery: The complete instance of the previous Query object [2]. This functionality is commonly used to implement paginated queries, where you can keep displaying "old" data while new data is being fetched, preventing UI loading states from jumping [1][4]. The library provides a built-in helper called keepPreviousData, which is an identity function that returns the previousData; using placeholderData: keepPreviousData is the standard way to achieve this behavior in v5 [4][3]. When placeholder data is active, the result object will have the isPlaceholderData flag set to true [1][2]. Unlike initialData, placeholderData is not persisted to the cache [1][5].

Citations:


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- direct search atom consumers ---'
rg -n -C 5 'sidebarSessionSearch(Open|Query|Results|Loading)Atom' web --glob '*.{ts,tsx,js,jsx}' | head -220
printf '%s\n' '--- projectId declaration and writers ---'
rg -n -C 5 'export .*projectIdAtom|const projectIdAtom|set\(projectIdAtom|projectIdAtom,' web/packages/agenta-shared web/packages/agenta-navigation web/oss web 2>/dev/null | head -220

Repository: Agenta-AI/agenta

Length of output: 30243


Scope placeholder data by project. When projectIdAtom changes, placeholderData can return session rows from the previous query while the project-keyed request loads. Compare previousQuery?.queryKey[1] with projectId and return undefined on mismatch. Otherwise, prior-project session metadata can render in the sidebar.

Source: Coding guidelines

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. placeholderData now compares previousQuery?.queryKey[1] with projectId and returns undefined on a mismatch, so it only holds rows within the same project.

This is the same guard keepPreviousDataWithinProject applies to the rail's own session queries a few hundred lines up in this file. I wrote the palette's atom without it, which is exactly the case that helper exists for.

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

📘 Docs preview

Status ✅ Ready
Preview https://pr-6738-agenta-docs-preview.mahmoud-637.workers.dev/docs
Inspect Actions run
Commit 423f5d351d68a6edfc18714bc716ac5e70de0bf7

This comment updates in place on every push.

@ashrafchowdury
ashrafchowdury changed the base branch from release/v0.115.4 to feat/mobile-home-focus September 11, 2026 06:03
@ashrafchowdury
ashrafchowdury added this pull request to stack #6769 September 11, 2026 06:03
@github-actions

Copy link
Copy Markdown
Contributor

Website preview

Preview URL: https://pr-6738-agenta-website-preview.mahmoud-637.workers.dev

Built from 423f5d351d68a6edfc18714bc716ac5e70de0bf7. This comment updates in place on every push.

@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: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Advanced

Run ID: 5fe6dedb-b0cb-4678-b3ca-2ea2db9de9d8

📥 Commits

Reviewing files that changed from the base of the PR and between 4a7b7c2 and 423f5d3.

📒 Files selected for processing (8)
  • web/mobile/src/features/nav/DrawerProjectSwitcher.tsx
  • web/mobile/src/features/nav/useMobileNavItems.tsx
  • web/oss/src/components/Sidebar/hooks/useSidebarConfig/index.tsx
  • web/packages/agenta-navigation-ui/src/SessionFilterMenu.tsx
  • web/packages/agenta-navigation-ui/src/SessionSearchButton.tsx
  • web/packages/agenta-navigation-ui/src/reorder/engine.ts
  • web/packages/agenta-navigation/src/dynamic/sessionsSource.ts
  • web/packages/agenta-navigation/src/index.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 4 remain after this review.

Comment on lines +856 to +858
const query = get(sidebarAgentActivityQueryAtomFamily(scopeId))
return {
any: (query.data?.length ?? 0) > 0,

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use a separate all-session query for sidebarHasAnySessionAtomFamily. sidebarAgentActivityQueryAtomFamily excludes trigger sessions for agent ranking. In an automation-only project, any is false, so SessionFilterMenu returns null and hides the Automation filter. Keep the ranking query chat-only and derive any from a project-scoped query that includes trigger sessions.

Blank agent becomes New agent over one line of what it does, and the
entry takes a tile like the templates under it so the menu reads as one
list of alternatives rather than a button above a list.
A sticky header drops its own bottom margin, or a 4px slot of rows shows
through as they pass under it. The first run pays it back as padding
instead, so a row's hover fill no longer sits flush on the rule.
The header, the group headings and the rows each inset their content by
8px, so everything inside the table started 8px in from the column the
page title and the toolbar keep — the first heading and the first cell
under it both sat off that line.

The inset goes from all of them at once. That is the part that matters:
the header's content box has to stay identical to a row's, or the two
resolve their grid tracks differently and every column but the first
drifts off its cells.

A row then takes the space back as bleed rather than as inset: its box
grows 12px on each side and its padding gives the same 12px back, so the
hover fill clears the text it covers while the text itself stays on the
table's edge, and the content box — and so the tracks — never move.
The view a reader sets — which roster, whose agents, what state, how the
rows group — and the pure derivation over it, kept out of the screen so
the screen renders what this returns rather than deriving it mid-render.
The same split sessionListView.ts makes next door.

Type is deliberately absent from the predicates: it picks WHICH roster
the screen fetches, so rows already match it by the time they arrive.

Status is the one state an agent actually has here — whether a session of
its own is blocked on a person. The design's Active/Paused/Needs-attention
belongs to an automation, which has a trigger to pause; an agent has none.
…esign

Brings the rail to option 1b of the Claude Design "Sidebar Reorg" project, and
moves three things that were sitting in the wrong place.

Density. Rows are 26px at 13px where they were 28px at 14px, the brand row is
32px with an 80x18 wordmark instead of 48px, and session titles drop to 12px
with 10px status glyphs, so the session pane reads as a list under the nav
rather than as more nav.

Session rows line up with the nav. The 22px indent and the vertical guide line
are gone for groups that carry no collapse control, which is what pushed every
status dot out of the column the Home, Agents and Sessions icons share. Keyed
on alwaysOpen rather than on the Sessions key: a group you cannot collapse is a
section of the rail, and its rows are rail rows. The Evaluation group, which you
do open, keeps its indent and its line.

Agents is a plain row. Its dynamic child list is gone; an agent list in the rail
was a second, shorter answer to a question the Agents page already answers in
full, and the caret it needed made the row look like the Sessions group, which
is the rail's only real list. That removed the last caller of
sidebarAgentRanksAtomFamily, so it goes too, along with withManualAgentRanks and
the 'agents' drag zone behind it. The agent headings under Sessions keep their
own zone and their own counts.

Releases leave the banner queue. They read as a "What's new?" list inside the
help menu now. A release is news, not a task: it does not need clearing, and
eleven of them queued two at a time made it feel like one. The queue keeps
star-repo and the trial/upgrade banners EE injects, which are tasks.

Help becomes an icon button on the switcher row, drawing the same flyout the
collapsed rail draws. Book a call comes out and Keyboard shortcuts takes its
place, which gives the shortcuts sheet a visible way in; it had been reachable
only through a bare '?' hotkey that teaches nobody.

Session search. A magnifier beside the filter opens a palette backed by a
debounced server search. Filtering the rail's own fifty-row window would search
the top of the list and call everything else missing, which is the one case a
search exists for.

The rail's filter uses the shared menu. SessionFilterMenu went from 220 lines to
a section map over @agenta/ui/filter-menu, the same panel the automations list
opens, and the superseded presentational/filter/FilterMenu is deleted; this was
its last caller.

Dark selection stops shouting. The selected row painted an olive wash with
accent-yellow text and no ring, the loudest thing on a rail whose job is to sit
still, and it disagreed with light. One rule in both themes now: a raised
surface, a hairline, and the text left alone. Dark is #242424 on the #101010
rail with a #292929 ring, changed at the source in palette.ts with the tokens
regenerated.

Verified on the running mobile app throughout, measuring geometry in the DOM:
session glyphs and nav icons both at left 20px, brand row exactly 32px,
collapsed icons 28px with 4px between them, and the three bottom controls
stepping evenly. tsc clean on oss and mobile, eslint clean, 82 navigation unit
tests pass (down from 86: the four withManualAgentRanks cases described a helper
that no longer exists).
Creators come from the org's member roster under the same cache key the
settings screen already reads, so arriving from Settings costs no request
and the two surfaces cannot disagree about a name.

Archived agents need a second query: the shared apps list omits
include_archived because the nav rail reads absence there as archived
(#6457), so flipping it would break the rail. It is gated on the facet
and keyed under agent-workflows, so archiving an agent invalidates both
this list and the live one in the same pass.
The rail no longer draws a banner card. The Sidebar Reorg design has no
card there, and after the changelog cards moved into the help menu's
"What's new?" list and the star-repo ask went with them (the same menu
links GitHub), nothing OSS or mobile showed was left.

Drops the banner model (`@agenta/navigation` banners: config types,
priority/dismissal atoms, the `additionalBannersAtom` seam), the
`SidebarBanner`/`SidebarBanners` renderers, the OSS
`SidePanel/Subscription` shim, and the footer mounts in the desktop
main scope and the mobile scope. The `footer` slot on `SidebarScope`
stays: it is shell contract, not banner code.

EE: its `SidePanel/Subscription` shadow module injected trial/upgrade
banners through the seam removed here, so it goes with this.
Additive package changes only: agentConfigSummary names the integration behind each gateway-connection tool, NextTriggersSection's row derivation moves into a useUpcomingTriggers hook a host with its own card chrome can call, and composioLogo is exported for any integration key outside PROVIDERS.
The roster is the shared ListTable — the frame the sessions and
automations lists already use — with this app's columns, the shared agent
kebab, and rename in place from a row rather than through a modal.

Search sits in a ListTableToolbar beside the shared FilterMenu carrying
Created by, Type, Status and Group by. A workflow becomes a row in one
place, so no cell re-derives a creator's name or a waiting count from
lookup maps handed down beside it.

Every state is designed: skeleton, empty, no-match and a failed fetch
with a retry — a request that never answered must not read as an empty
project.
Reverts the density pass. Rows return to h-7 / 14px / leading-7 with
their 4px margin, group headings to pt-2, session titles to the row's
own size, and the status glyphs to 12/12/10. The 26px/13px column read
as one packed list with no breathing room next to ChatGPT, Manus and the
rail we shipped before. The alignment work stays: session glyphs still
sit in the nav icons' column, and the logo and collapsed rail keep their
smaller geometry.
The overview reads the way the Agent Overview design does: a description and an Open chat verb in the header, Home's composer with voice, then one activity list under Sessions | Automation runs tabs with the shared filter menu (status, window, grouping) instead of two stacked cards. The rail is three soft cards owned by this app — Configuration with stacked integration marks, Files with Open drive, Automations with a clock or bolt per trigger — built on the sessions table's frame and the entity-ui hooks, so no desktop chrome changes. Usage is dropped, as designed.
… map

main replaced filterAgentWorkflows(workflows, latestRevisions) with selectAgentWorkflows over
a per-project agent-flags map (#classify agents once per project), and this hook still called
the old name — the mobile typecheck and image build failed on it after the rebase.

ensureAgentFlags is the better fit anyway: the shared map already covers archived workflows,
so the second round trip this hook used to make for their latest revisions is now a cache
hit.
The gateway-tool surface is a list of connected apps (Gmail, Slack), and "tool"
also names the tool CALLS a transcript shows — two things under one word. This
app now says Integrations for the connected-app concept: the settings tab, its
nav entries, the connections table, and the agent overview's config row.

oss/ee keep their wording, so the rename is a mobile copy layer
(web/mobile/src/lib/integrationsCopy.ts) over shared components that now take an
optional copy prop and default to the old strings.
The shared filter menu's flyout is 188px, sized for words like "Last
30 days". Agent names are longer — "Search Console Assistant" truncated
to "Search Consol…" — so a section can now ask for a `wide` flyout,
which matches the panel's own 248px. Only the Agent facet opts in, in
the rail's session filter and the sessions page's.
The description under the overview's title edits the way the name does: tap it (or Edit description in the kebab) and it becomes a one-line input; Enter commits, Esc cancels, blank clears. An agent with no description shows the same line as an 'Add a description' prompt, so the header keeps one shape. The line truncates at the composer column's width.

Package pieces, all additive: useUpdateAgentDescription beside useRenameAgent, an optional Edit description entry on AgentActionsMenu, allowEmpty on useInlineRename, and updateWorkflow treating an empty description as a change rather than skipping the request.
Rows drop from 50px to 40px. ListTable gains a density prop rather than a global change, because the lists it frames are not the same length: sessions runs to hundreds of rows, where 13px above and below each is a screen of air per hundred, while an automations list is a dozen a reader scans once. Compact is 8px; the default is untouched, so the automations and agents tables keep their rhythm.

The skeleton takes the same value as the rows, so loading holds the rhythm the rows arrive in. The rename input drops to the kebab's height, the tallest thing in a resting row, so a row being renamed stays the height of its neighbours.

Its own lane above the agents page: that branch and the sessions one both edit ListTable, in that order, so this had nowhere lower to land without breaking one of them.
The Type row held only Active/Archived, two entries to say one bit; it is now an "Only archived" toggle row.
Repo rule (web/AGENTS.md): at most one short line per comment.
@ashrafchowdury
ashrafchowdury changed the base branch from feat/mobile-home-focus to feat/mobile-automations September 11, 2026 14:23
@ashrafchowdury
ashrafchowdury merged commit aac1f3e into feat/mobile-automations Sep 11, 2026
39 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant