Skip to content

Commit 8e40b57

Browse files
chore(ui): UI fixes (#7)
* feat: inital set of ui fixes * chore: initial set of fixes for monitoring * chore: remove scrollarea for sticky header to work. * chore: tests * chore: observability minor fixes, code refactoring * fix: add tab level route * feat: initial setup to support qp in modals + update tests * fix: close all modals on success * chore: control name error rendering * fix: limit height of tables * feat: observability ui updated
1 parent a0fa597 commit 8e40b57

47 files changed

Lines changed: 4188 additions & 2297 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎ui/AGENTS.md‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,17 @@ pnpm fetch-api-types # regenerate API types from server (must be running on :80
4949
- `core/page-components/` — actual page UI logic lives here
5050
- `core/layouts/` — app shell, sidebar navigation
5151

52-
### Evaluator forms (`core/page-components/agent-detail/edit-control/evaluators/`)
52+
### Evaluator forms (`core/evaluators/`)
5353
- Each evaluator type has its own folder: `json/`, `sql/`, `regex/`, `list/`, `luna2/`
5454
- Each folder exports: `form.tsx` (React component), `types.ts` (form types), `index.ts` (re-exports)
5555
- Registry in `evaluators/index.ts` maps evaluator names to form components
5656

57+
### Form guidelines (control definition + evaluator forms)
58+
- **Always use the input's `label` prop** — never render a separate `<Text>` above the input as the label. Use Mantine's built-in `label` so required asterisks and layout are consistent.
59+
- **Label with tooltip**: Use `LabelWithTooltip` from `@/core/components/label-with-tooltip` when a field needs an (i) icon that shows help text on hover. Pass `label={<LabelWithTooltip label="Field name" tooltip="Help text..." />}` and, for inputs that support it, `labelProps={labelPropsInline}` so the label renders inline.
60+
- **Required fields**: Use the input's `required` prop (e.g. Select, TextInput) so Mantine renders the red asterisk. Use `labelPropsInline` from the same module when you need the label inline.
61+
- Applies to: control definition form (`edit-control/control-definition-form.tsx`) and all evaluator forms (`core/evaluators/*/form.tsx`).
62+
5763
### Reusable components (`core/components/`)
5864
- Create reusable components that encapsulate common patterns and logic
5965
- **Best practice**: When creating wrapper components around Mantine components, extend the underlying component's props using `Omit` to exclude overridden props, then spread `...rest` to forward all other props
@@ -96,9 +102,9 @@ export function SearchInput({
96102
## Common changes
97103

98104
### Add a new evaluator form
99-
1. Create folder in `core/page-components/agent-detail/edit-control/evaluators/<name>/`
105+
1. Create folder in `core/evaluators/<name>/`
100106
2. Add `types.ts` with form field types
101-
3. Add `form.tsx` with the form component (use Mantine form components)
107+
3. Add `form.tsx` with the form component — use Mantine form components with `label` prop and `LabelWithTooltip` from `@/core/components/label-with-tooltip` for fields that need a tooltip (see Form guidelines above)
102108
4. Add `index.ts` re-exporting form and types
103109
5. Register in `evaluators/index.ts`
104110

‎ui/empty-css-module.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Empty module to replace CSS imports from Jupiter DS
2+
// (we import the CSS manually in _app.tsx)
3+
module.exports = {};

‎ui/next.config.ts‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,30 @@ const nextConfig: NextConfig = {
44
pageExtensions: ['tsx', 'ts', 'jsx', 'js'],
55
reactStrictMode: true,
66

7+
// Transpile Jupiter DS package to handle CSS imports
8+
transpilePackages: ['@rungalileo/jupiter-ds'],
9+
10+
// Configure webpack to ignore CSS imports from Jupiter DS
11+
// (we import the CSS manually in _app.tsx)
12+
webpack: (config) => {
13+
const webpack = require('webpack');
14+
15+
// Replace CSS imports from Jupiter DS with empty module
16+
config.plugins.push(
17+
new webpack.NormalModuleReplacementPlugin(
18+
/^@mantine\/dates\/styles\.css$/,
19+
(resource: any) => {
20+
// Only replace if imported from Jupiter DS
21+
if (resource.context && resource.context.includes('@rungalileo/jupiter-ds')) {
22+
resource.request = require.resolve('./empty-css-module.js');
23+
}
24+
}
25+
)
26+
);
27+
28+
return config;
29+
},
30+
731
// Optimize for CI/test builds
832
...(process.env.CI && {
933
// Disable source maps in CI (faster builds, not needed for tests)

‎ui/package.json‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
"test:integration:report": "playwright show-report"
1818
},
1919
"dependencies": {
20+
"@emotion/is-prop-valid": "^1.4.0",
21+
"@mantine/charts": "^7.17.8",
2022
"@mantine/code-highlight": "7.17.5",
2123
"@mantine/core": "7.17.5",
2224
"@mantine/dates": "7.17.5",
@@ -26,7 +28,7 @@
2628
"@mantine/modals": "7.17.7",
2729
"@mantine/notifications": "7.17.7",
2830
"@rungalileo/icons": "^0.0.1",
29-
"@rungalileo/jupiter-ds": "^0.0.2",
31+
"@rungalileo/jupiter-ds": "^0.0.7",
3032
"@tabler/icons-react": "3.31",
3133
"@tanstack/react-query": "5.74.4",
3234
"@tanstack/react-query-devtools": "5.72.2",
@@ -38,7 +40,8 @@
3840
"next": "15.4.10",
3941
"openapi-fetch": "0.14.0",
4042
"react": "^19.1.4",
41-
"react-dom": "^19.1.4"
43+
"react-dom": "^19.1.4",
44+
"recharts": "2"
4245
},
4346
"devDependencies": {
4447
"@eslint/eslintrc": "^3.3.3",

0 commit comments

Comments
 (0)