Skip to content

Add the sidebar#585

Merged
spashii merged 3 commits into
mainfrom
feature/sidebar
May 22, 2026
Merged

Add the sidebar#585
spashii merged 3 commits into
mainfrom
feature/sidebar

Conversation

@spashii
Copy link
Copy Markdown
Member

@spashii spashii commented May 22, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Redesigned sidebar with workspace-scoped navigation views (home, help, inbox, settings)
    • Added conversation filtering: search, tag filters, and verified-only toggle
    • New project home page displaying recent conversations and quick action buttons
  • Refactor

    • Updated app navigation from project-centric to workspace-scoped route structure
    • Simplified core layout components for improved navigation integration
    • Enhanced external member role handling across workspaces and organizations

Review Change Stack

spashii and others added 3 commits May 22, 2026 07:31
Lands the feature/sidebar branch:
- New AppSidebar with per-scope views (user, org, workspace, project,
  admin, settings, help, inbox) and a stable shell/header/footer.
- Project sidebar: drop Upload/Integrations/Export top-level items;
  Conversations gains a count badge; Explore marked as Planned.
- Project settings sidebar gets a merged "Integrations & Export"
  entry; /export now redirects to /integrations and the route renders
  both ProjectExportSection and WebhookSection.
- Global Settings entry now navigates directly to /settings/account
  (first item), eliminating the second-click required by the old
  ?sidebar=settings overlay. Logout moved onto UserSettingsView.
- External-link affordance: NavButton + Mantine Menu.Item get a
  hover-revealed ArrowUpRight icon for outbound links (Docs, Slack,
  Support, etc.).
- UserHomeView reorganised around internal vs external orgs; admin
  dashboard tinted purple via new NavItem accent prop.
- Project home page replaces the ongoing/open summary cards with a
  cleaner stack: QR + jump-to actions (Upload now lives here), 1-2
  latest conversations with summaries/tags, and one latest report
  shown only when it has a title.
- Align with #582: rename OrganisationGuestView -> Organisation-
  ExternalView; replace ws.is_external reads with role === "external"
  in sidebar views; drop the "guest" backward-compat case in roles.ts.
- ProjectConversationsPanel title: "Responses" -> "Conversations".
- Fix OnboardingRoute invite input losing focus on every keystroke
  (key was value-based, causing remount).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nouncement rows

Replaces the static InboxView summary panels with the behavior the drawer
had pre-sidebar — tabs (For you / Updates) with per-tab unread badges and
mark-all-read, clickable notification rows that mark-read and navigate via
resolveNotificationHref, severity-aware coloring, avatars/timestamps,
inline markdown, per-row mark-read on hover. Adds infinite scroll for
announcements and a compact AnnouncementRowItem styled to match
NotificationRowItem so chunky Mantine padding doesn't dominate the 240px
sidebar rail.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Clicking the Inbox bell from /w/:id/home, /o/:id, or /w/:id/settings/<tab>
would land on `?sidebar=inbox` and immediately have it stripped — the
workspace home `setSearchParams({ search })` clobbered all params, and
the org/workspace-settings tab bouncers passed bare paths to
`navigate({ replace: true })`. Each path now preserves the existing
search string so sidebar overlays survive bouncing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 89d569ad-18cd-489f-afff-e39eadb33cc6

📥 Commits

Reviewing files that changed from the base of the PR and between 8a021db and 0ae5859.

⛔ Files ignored due to path filters (3)
  • echo/scripts/__pycache__/backfill_direct_memberships.cpython-311.pyc is excluded by !**/*.pyc
  • echo/scripts/__pycache__/create_schema.cpython-311.pyc is excluded by !**/*.pyc
  • echo/scripts/__pycache__/seed_dev.cpython-311.pyc is excluded by !**/*.pyc
📒 Files selected for processing (128)
  • echo/api.http
  • echo/check-later.md
  • echo/frontend/AGENTS.md
  • echo/frontend/src/Router.tsx
  • echo/frontend/src/components/aspect/AspectCard.tsx
  • echo/frontend/src/components/auth/hooks/index.ts
  • echo/frontend/src/components/chat/ChatAccordion.tsx
  • echo/frontend/src/components/chat/References.tsx
  • echo/frontend/src/components/chat/Sources.tsx
  • echo/frontend/src/components/common/WorkspaceRedirect.tsx
  • echo/frontend/src/components/conversation/ConversationAccordion.tsx
  • echo/frontend/src/components/conversation/ConversationDangerZone.tsx
  • echo/frontend/src/components/conversation/ConversationLink.tsx
  • echo/frontend/src/components/conversation/ConversationLinks.tsx
  • echo/frontend/src/components/conversation/MoveConversationButton.tsx
  • echo/frontend/src/components/conversation/OngoingConversationsSummaryCard.tsx
  • echo/frontend/src/components/conversation/OpenForParticipationSummaryCard.tsx
  • echo/frontend/src/components/conversation/ProjectConversationsPanel.tsx
  • echo/frontend/src/components/conversation/RetranscribeConversation.tsx
  • echo/frontend/src/components/conversation/hooks/index.ts
  • echo/frontend/src/components/error/ErrorBoundary.tsx
  • echo/frontend/src/components/error/ErrorPage.tsx
  • echo/frontend/src/components/insight/Insight.tsx
  • echo/frontend/src/components/layout/AuthLayout.tsx
  • echo/frontend/src/components/layout/BaseLayout.tsx
  • echo/frontend/src/components/layout/Header.tsx
  • echo/frontend/src/components/layout/PageContainer.tsx
  • echo/frontend/src/components/layout/ProjectConversationLayout.tsx
  • echo/frontend/src/components/layout/ProjectLayout.tsx
  • echo/frontend/src/components/layout/ProjectOverviewLayout.tsx
  • echo/frontend/src/components/layout/TabsWithRouter.tsx
  • echo/frontend/src/components/project/HostGuideDownload.tsx
  • echo/frontend/src/components/project/PinnedProjectCard.tsx
  • echo/frontend/src/components/project/ProjectCard.tsx
  • echo/frontend/src/components/project/ProjectDangerZone.tsx
  • echo/frontend/src/components/project/ProjectExportSection.tsx
  • echo/frontend/src/components/project/ProjectListItem.tsx
  • echo/frontend/src/components/project/ProjectQRCode.tsx
  • echo/frontend/src/components/project/ProjectSidebar.tsx
  • echo/frontend/src/components/project/hooks/index.ts
  • echo/frontend/src/components/quote/Quote.tsx
  • echo/frontend/src/components/report/ConversationStatusTable.tsx
  • echo/frontend/src/components/report/ReportModalNavigationButton.tsx
  • echo/frontend/src/components/settings/FontSettingsCard.tsx
  • echo/frontend/src/components/settings/MyAccessCard.tsx
  • echo/frontend/src/components/view/View.tsx
  • echo/frontend/src/features/sidebar/AppSidebar.tsx
  • echo/frontend/src/features/sidebar/animations/ViewTransition.tsx
  • echo/frontend/src/features/sidebar/animations/motion.ts
  • echo/frontend/src/features/sidebar/blocks/HelpBlock.tsx
  • echo/frontend/src/features/sidebar/blocks/InboxBlock.tsx
  • echo/frontend/src/features/sidebar/blocks/SearchBlock.tsx
  • echo/frontend/src/features/sidebar/blocks/SettingsBlock.tsx
  • echo/frontend/src/features/sidebar/breadcrumbs/AppBreadcrumbs.tsx
  • echo/frontend/src/features/sidebar/hooks/useRecents.ts
  • echo/frontend/src/features/sidebar/hooks/useRecordRecents.ts
  • echo/frontend/src/features/sidebar/hooks/useSidebarOverlayLink.ts
  • echo/frontend/src/features/sidebar/hooks/useSidebarState.ts
  • echo/frontend/src/features/sidebar/hooks/useSidebarView.ts
  • echo/frontend/src/features/sidebar/index.ts
  • echo/frontend/src/features/sidebar/primitives/BackButton.tsx
  • echo/frontend/src/features/sidebar/primitives/NavButton.tsx
  • echo/frontend/src/features/sidebar/primitives/NavItem.tsx
  • echo/frontend/src/features/sidebar/primitives/SectionLabel.tsx
  • echo/frontend/src/features/sidebar/primitives/ViewHeader.tsx
  • echo/frontend/src/features/sidebar/shell/ResizeHandle.tsx
  • echo/frontend/src/features/sidebar/shell/SidebarHeader.tsx
  • echo/frontend/src/features/sidebar/shell/SidebarShell.tsx
  • echo/frontend/src/features/sidebar/shell/UserMenu.tsx
  • echo/frontend/src/features/sidebar/shell/useSidebarWhitelabelLogo.ts
  • echo/frontend/src/features/sidebar/types.ts
  • echo/frontend/src/features/sidebar/views/HelpView.tsx
  • echo/frontend/src/features/sidebar/views/InboxView.tsx
  • echo/frontend/src/features/sidebar/views/StubView.tsx
  • echo/frontend/src/features/sidebar/views/admin/AdminHomeView.tsx
  • echo/frontend/src/features/sidebar/views/org/OrgHomeView.tsx
  • echo/frontend/src/features/sidebar/views/org/OrgSettingsView.tsx
  • echo/frontend/src/features/sidebar/views/project/ProjectHomeView.tsx
  • echo/frontend/src/features/sidebar/views/project/ProjectSettingsView.tsx
  • echo/frontend/src/features/sidebar/views/user/UserHomeView.tsx
  • echo/frontend/src/features/sidebar/views/user/UserSettingsView.tsx
  • echo/frontend/src/features/sidebar/views/workspace/WorkspaceHomeView.tsx
  • echo/frontend/src/features/sidebar/views/workspace/WorkspaceSettingsView.tsx
  • echo/frontend/src/hooks/useNotifications.ts
  • echo/frontend/src/hooks/useWorkspace.ts
  • echo/frontend/src/lib/api.ts
  • echo/frontend/src/lib/authCacheBoundary.ts
  • echo/frontend/src/lib/roles.ts
  • echo/frontend/src/routes/admin/AdminSettingsRoute.tsx
  • echo/frontend/src/routes/auth/Login.tsx
  • echo/frontend/src/routes/auth/VerifyEmail.tsx
  • echo/frontend/src/routes/invite/AcceptInviteRoute.tsx
  • echo/frontend/src/routes/invite/MyInvitesRoute.tsx
  • echo/frontend/src/routes/onboarding/OnboardingRoute.tsx
  • echo/frontend/src/routes/organisation/OrganisationExternalView.tsx
  • echo/frontend/src/routes/organisation/OrganisationRoute.tsx
  • echo/frontend/src/routes/project/CreateProjectRoute.tsx
  • echo/frontend/src/routes/project/ProjectHomeRoute.tsx
  • echo/frontend/src/routes/project/ProjectRoutes.tsx
  • echo/frontend/src/routes/project/ProjectsHome.tsx
  • echo/frontend/src/routes/project/chat/NewChatRoute.tsx
  • echo/frontend/src/routes/project/chat/ProjectChatRoute.tsx
  • echo/frontend/src/routes/project/library/ProjectLibraryAspect.tsx
  • echo/frontend/src/routes/project/library/ProjectLibraryView.tsx
  • echo/frontend/src/routes/settings/UserSettingsRoute.tsx
  • echo/frontend/src/routes/sidebar-preview/SidebarPreviewLayout.tsx
  • echo/frontend/src/routes/sidebar-preview/SidebarPreviewRoute.tsx
  • echo/frontend/src/routes/workspaces/CreateWorkspaceRoute.tsx
  • echo/frontend/src/routes/workspaces/WorkspaceSelectorRoute.tsx
  • echo/frontend/src/routes/workspaces/WorkspaceSettingsRoute.tsx
  • echo/scripts/backfill_direct_memberships.py
  • echo/scripts/create_schema.py
  • echo/scripts/create_user_pin_schema.py
  • echo/scripts/estimate_recorded_hours.py
  • echo/scripts/lock_directus_permissions.py
  • echo/scripts/matrix_smoke.py
  • echo/scripts/migrate_inherited_to_derived.py
  • echo/scripts/preseed/example.yaml
  • echo/scripts/preseed_workspace.py
  • echo/scripts/remove_invite_token_field.py
  • echo/scripts/seed_dev.py
  • echo/scripts/seed_project_conversations.py
  • echo/scripts/smoke_test_v2.py
  • echo/server/dembrane/api/project.py
  • echo/server/dembrane/api/v2/bff/conversations.py
  • echo/server/dembrane/api/v2/middleware.py
  • echo/server/dembrane/api/v2/orgs.py
  • echo/server/dembrane/api/v2/workspaces.py

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


Walkthrough

Routes shift to /w workspace scope, legacy project-only paths removed or redirected, and a new App Sidebar replaces tab UIs. Many components update links/params. BFF/server add conversation filters/count semantics and external-access handling. Auth cache boundary event added. New sidebar preview and UX primitives introduced.

Changes

Workspace routing and new Sidebar system

Layer / File(s) Summary
Workspace-scoped routing, sidebar, links, and BFF/server updates
echo/frontend/src/Router.tsx, echo/frontend/src/features/sidebar/*, echo/frontend/src/components/**/*, echo/frontend/src/routes/**/*, echo/frontend/src/hooks/*, echo/server/dembrane/api/**/*
Moves navigation under /w, adds App Sidebar + preview, updates links/params across features, refactors tab wrappers, introduces auth cache boundary, and extends BFF/server for conversation filters and external role normalization.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

  • Dembrane/echo#577 — Also touches conversation surfaces and introduces workspace usage gating used here.
  • Dembrane/echo#235 — Modifies ProjectChatRoute around template/footer UI; this PR reworks templates and adds a conversation picker/modal.
  • Dembrane/echo#231 — Updates ConversationAccordion indicators; this PR further adjusts indicators and workspace-aware navigation.

Suggested labels

Feature, improvement

✨ 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 feature/sidebar

@spashii spashii merged commit ebb40c3 into main May 22, 2026
8 of 9 checks passed
github-merge-queue Bot pushed a commit that referenced this pull request May 25, 2026
fix: repair regressions from sidebar PR (#585)

The sidebar PR overlapped with #577, #581, #582, and #583 and introduced
  a few cross-cutting issues this commit addresses:

- Restore the "hide Project defaults for external-only users" gate in
the
new sidebar's UserSettingsView. PR #582/#583 added this filter to the
    old UserSettingsRoute; when the sidebar moved navigation into a new
view component, the NavItem rendered unconditionally and external-only
    users could click through to an empty pane.
- Drop schema-step tests that imported the deleted
scripts/create_schema.py
    one-shot seeding script. The committed snapshot under
directus/sync/snapshot/ is the source of truth now, so those structural
    guards were checking a script that no longer exists.
- Update AGENTS.md to remove the create_schema.py reference and point at
    the snapshot directory.
- Populate ref_workspace_id on PROJECT_SHARE_ROLE_CHANGED
(project_sharing.py),
    REPORT_READY, and REPORT_FAILED (tasks.py). The new useNotifications
    href builder requires both ref_workspace_id and ref_project_id to
    produce /w/{ws}/projects/... links; without it those notifications
    rendered as dead clicks.
- Strip the per-request org_membership lookup in get_workspace_context.
    PR #582 enforces role='external' ⟺ no org_membership at every write
path, and on_organisation_member_removed cascades workspace_membership
    soft-deletes correctly, so the read-side normalisation was redundant
    per-request DB overhead.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* User settings view now fetches and displays workspace access
information, conditionally showing relevant configuration options based
on access level.
* Notifications for project sharing and report status now include
workspace context information for better organization.

* **Documentation**
* Updated deployment guide with clarified schema snapshot and migration
script procedures.

* **Tests**
  * Removed legacy schema step validation tests from test suite.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Dembrane/echo/pull/586?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant