-
[OPIK-7125] [FE] feat: project menu improvements (pinning, breadcrumb menu) (#7386)
发布于
2026-07-13 11:22:32 +00:00 - [OPIK-7125] [FE] feat: project menu improvements (pinning, breadcrumb menu)
Rework the projects menu into a single shared ProjectMenuContent used by both
the sidebar project selector and the breadcrumb project item, so the two flows
render the same menu instead of duplicating it.- Sidebar: whole project header opens the menu; chevron aligned to the right
edge with a hover state on the full container - Menu: + New moved to the top, search, Pinned section, Recently updated
(top 10 by last_updated_trace_at), View all projects footer - Breadcrumb project item becomes a dropdown opening the same menu
- Pin/unpin projects, persisted in localStorage per workspace, replicating the
pinned-filters mechanism
Implements OPIK-7125: [Navigation] [Breadcrumbs] Project menu improvements
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
- fix(frontend): unpin deleted projects and move project dialog to pages-shared
Address PR review feedback on OPIK-7125:
- Unpin a project on delete-success for all rows (previously only the active
project was handled), so deleting a pinned-but-inactive project no longer
leaves a stale entry in localStorage that navigates to a deleted project. - Move AddEditProjectDialog from v2/pages/ProjectsPage to v2/pages-shared so
the layout-level project selectors no longer import page-scoped code; update
all v2 import sites.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
- fix(frontend): clear active project when deleting it from the projects table
ProjectRowActionsCell now clears active-project state on delete-success when the
deleted project is the active one, matching the menu delete path. Prevents a stale
id lingering in opik-active-project-{workspace} that useActiveProjectInitializer
could rehydrate.Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
- fix(frontend): re-resolve active project after it is cleared
useActiveProjectInitializer memoized the stored id by workspaceName only, so
after setActiveProject(..., null) the 'latest project' fallback stayed disabled
and the active project never re-resolved until reload or workspace switch. Add
the active project id to the memo deps so the stored id is re-read when it is
cleared/changed, letting the fallback pick the latest remaining project.Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
- fix(frontend): match Figma for project menu pin and footer
- Pin icon: use light-slate outline (not filled/foreground) so pinned projects
match the Figma design; show a crossed-out PinOff on hover to signal unpin. - View all projects: place the arrow right after the label instead of pushing
it to the far right.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
- fix(frontend): address project menu review feedback
- align project selector chevron with the project name
- exclude pinned projects from the recently-updated list
- add divider between the Pinned and Recently updated sections
- reclaim project-name width when the action icons are hidden
- add "More options" tooltip and keep the dropdown anchored to its trigger
- align the OSS workspace-selector padding with the comet plugin
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
- fix(frontend): hoist project menu dialogs and unify overlay primitive
Address final FE review on the project menu:
- Hoist a single Edit/Delete dialog and the delete mutation from each
ProjectMenuItem up to ProjectMenuContent, driven by a selected-project
target, instead of one mutation hook + two dialog subtrees per row. - Move row action buttons out of the so interactive controls no
longer nest inside an anchor (valid HTML / a11y). - Replace DropdownMenuLabel/Separator with a neutral section label and
Separator, since this body also renders inside a Popover. - Switch the breadcrumb selector from DropdownMenu to Popover to match
the sidebar, removing the search-input typeahead guard.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
- fix(frontend): preserve section on project new-tab; keep recent list full
Address baz re-review of the project menu:
- ProjectMenuItem's Link now uses the resolved resolveProjectSwitchTarget
instead of a hardcoded /home, so modifier-click / open-in-new-tab keeps
the current section and portable search params. - Fetch RECENTLY_UPDATED_SIZE + pinned count and slice to the size after
removing pinned projects, so "Recently updated" always fills to 10 even
when some recent projects are pinned.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com
下载附件