You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: address 6 more CodeRabbit findings from third review round
- agent_engine: type PersonalityTrimPayload identifier fields (agent_id,
agent_name, task_id) as NotBlankStr per CLAUDE.md identifier convention.
Pydantic validators don't fire inside a TypedDict at runtime, but the
alias documents intent and keeps the notifier contract consistent with
the rest of the codebase.
- web/CLAUDE.md: resolve the Tooltip inconsistency -- the 'Creating New
Components' and 'Base UI Adoption Decisions' sections no longer mention
Tooltip as preferred Base UI, since the adoption table does not list it
as adopted. Contributors are directed to reach for existing primitives
first and add a row to the table if a real Tooltip requirement appears.
- stores/agents: null-guard WsEvent.payload before casting to
Record<string, unknown>. The TypeScript 'as' cast is compile-time only
-- a malformed broker sending null would throw on the next property
access. The guard drops the event and logs the drop.
- stores/agents: sanitize attacker-controlled values in log.warn calls --
'agent' (URL route param) in fetchAgentDetail, 'status' in the
unknown-status branch of the agent.status_changed handler, and
'event_type' in the new payload-null guard. Matches the
'sanitizeForLog attacker-controlled fields' rule in web/CLAUDE.md.
- dialog.tsx: reuse the shared Button component inside DialogCloseButton
via Base UI's render prop, instead of duplicating the icon-button
styles. Keeps tokens, focus states, and hover semantics centralized.
- dialog.tsx: DialogDescription was text-muted (already fixed in prior
commit, retained here).
- useGlobalNotifications.test: resolve the 'agents' binding by channel
name via bindings.find(b => b.channel === 'agents') instead of by
index, so adding unrelated subscriptions upstream cannot silently
break the suite.
Copy file name to clipboardExpand all lines: web/CLAUDE.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,7 @@ When a new shared component is needed (not covered by the inventory above):
111
111
3. Export props as a TypeScript interface
112
112
4. Use design tokens exclusively -- no hardcoded colors, fonts, or spacing
113
113
5. Import `cn` from `@/lib/utils` for conditional class merging
114
-
6.**For primitives backed by Base UI** (Dialog, Popover, Menu, Tabs, Tooltip, etc. -- see the Adoption Decisions table below for the canonical list; `Select`, `Toast`, `Drawer`, `Meter`, `Combobox` are intentionally **not** adopted):
114
+
6.**For primitives backed by Base UI** (Dialog, AlertDialog, Popover, Menu, Tabs-- see the Adoption Decisions table below for the canonical list; `Select`, `Toast`, `Drawer`, `Meter`, `Combobox`, `Tooltip` are intentionally **not** adopted):
115
115
- Import from the specific subpath: `import { Dialog } from '@base-ui/react/dialog'`
116
116
- Use the component's `render` prop for polymorphism: `<Dialog.Trigger render={<Button>Open</Button>} />`. Never spread props manually.
117
117
- For Dialog/AlertDialog/Popover: compose with `Portal` + `Backdrop` + `Popup`. Popover and Menu additionally require a `Positioner` wrapper that owns `side` / `align` / `sideOffset`.
@@ -155,7 +155,7 @@ The dashboard uses Base UI as its primitive layer via shadcn/ui. Base UI ships s
155
155
|`Select`|**Not adopted**|`SelectField` is a native `<select>` -- we intentionally keep the native mobile picker for iOS/Android UX. Replacing with a custom dropdown would lose that. |
156
156
|`Combobox`, `Autocomplete`|**Not adopted (for now)**| No current typeahead call sites in the dashboard that would benefit. Re-evaluate when filterable selects become a feature requirement. |
157
157
158
-
When adding new dashboard primitives, prefer Base UI components for accessibility (Dialog, Menu, Popover, Tabs, Tooltip, etc.) and keep the existing custom components (`SelectField`, `Drawer`, `Toast`, `ProgressGauge`, animations) where they are -- see the Adoption Decisions table above for the canonical rationale.
158
+
When adding new dashboard primitives, prefer Base UI components for accessibility (Dialog, AlertDialog, Popover, Tabs, Menu) and keep the existing custom components (`SelectField`, `Drawer`, `Toast`, `ProgressGauge`, animations) where they are -- see the Adoption Decisions table above for the canonical rationale. Tooltip is not yet adopted; reach for an existing primitive first and add a row to the table above if a real Tooltip requirement appears.
0 commit comments