Consolidate top bar#71
Conversation
Greptile SummaryThis PR consolidates the top navigation bar by introducing a
Confidence Score: 5/5The change is safe to merge; the new pages and nav restructuring are additive and well-guarded. All new routes are behind PageGuard with proper defaults, the ownerOverride change is backward-compatible, and query invalidation is handled consistently. The one flagged item (imperative navigation in dropdown items) is a UX limitation with no data or auth impact. ui/src/components/Header/Header.tsx — NavGroupMenu renders dropdown items without real anchor elements. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
NE["navEntries: NavEntry[]"]
NE --> NG["NavGroup (Resources dropdown)"]
NE --> NI["NavItem (Chat, Studio, Projects…)"]
NG --> VF["visibleNavEntries filter\n(drop group if all items disabled)"]
NI --> VF
VF --> AALL["allNavEntries\n(+ adminNavItem if admin)"]
AALL -->|isNavGroup| NGM["NavGroupMenu\n(Dropdown with navigate())"]
AALL -->|NavItem| NL["NavLink"]
NGM --> RES["Resources items:\nAPI Keys, Containers, Knowledge,\nProviders, Skills, Templates"]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
NE["navEntries: NavEntry[]"]
NE --> NG["NavGroup (Resources dropdown)"]
NE --> NI["NavItem (Chat, Studio, Projects…)"]
NG --> VF["visibleNavEntries filter\n(drop group if all items disabled)"]
NI --> VF
VF --> AALL["allNavEntries\n(+ adminNavItem if admin)"]
AALL -->|isNavGroup| NGM["NavGroupMenu\n(Dropdown with navigate())"]
AALL -->|NavItem| NL["NavLink"]
NGM --> RES["Resources items:\nAPI Keys, Containers, Knowledge,\nProviders, Skills, Templates"]
Reviews (3): Last reviewed commit: "Review fixes" | Re-trigger Greptile |
| onSaved={() => { | ||
| toast({ | ||
| title: editingSkill ? "Skill updated" : "Skill created", | ||
| type: "success", | ||
| }); | ||
| }} |
There was a problem hiding this comment.
Skills list not refreshed after save
The onSaved callback only fires a toast but never calls queryClient.invalidateQueries. After creating or editing a skill the table will silently show stale data until a hard reload. TemplatesPage (added in the same PR) correctly calls invalidateTemplates() in its onSaved. Add the same invalidation here — at minimum queryKey: [{ _id: "skillList" }], and any other query key that useUserSkills subscribes to.
Prompt To Fix With AI
This is a comment left during a code review.
Path: ui/src/pages/SkillsPage.tsx
Line: 139-144
Comment:
**Skills list not refreshed after save**
The `onSaved` callback only fires a toast but never calls `queryClient.invalidateQueries`. After creating or editing a skill the table will silently show stale data until a hard reload. `TemplatesPage` (added in the same PR) correctly calls `invalidateTemplates()` in its `onSaved`. Add the same invalidation here — at minimum `queryKey: [{ _id: "skillList" }]`, and any other query key that `useUserSkills` subscribes to.
How can I resolve this? If you propose a fix, please make it concise.
No description provided.