fsanyoto commited on
Commit
b9bf750
·
verified ·
1 Parent(s): a2aa364

Deploy AIOS web (React glide grid + FastAPI slice)

Browse files
RELEASES.json CHANGED
@@ -1,4 +1,4 @@
1
  {
2
- "current": "05336044da",
3
  "releases": []
4
  }
 
1
  {
2
+ "current": "007459c636",
3
  "releases": []
4
  }
VERSION CHANGED
@@ -1 +1 @@
1
- 05336044da
 
1
+ 007459c636
api/routes_query.py CHANGED
@@ -1839,7 +1839,7 @@ def _clean_spec_edit(config, spec, fields):
1839
  elif member in ("groupBy", "colorBy"):
1840
  out[member] = value if value in keys else None
1841
  elif member == "rowHeightMode":
1842
- out[member] = value if value in ("short", "medium", "tall", "extra") else None
1843
  elif member == "frozenCount":
1844
  out[member] = max(0, min(6, int(value))) if isinstance(value, (int, float)) else 0
1845
  elif member == "display":
 
1839
  elif member in ("groupBy", "colorBy"):
1840
  out[member] = value if value in keys else None
1841
  elif member == "rowHeightMode":
1842
+ out[member] = value if value in ("compact", "short", "medium", "tall", "extra") else None
1843
  elif member == "frozenCount":
1844
  out[member] = max(0, min(6, int(value))) if isinstance(value, (int, float)) else 0
1845
  elif member == "display":
platform/core/grid_events.py CHANGED
@@ -929,7 +929,7 @@ def _clean_secondary_view(raw):
929
  'sorts': list(cfg.get('sorts') or [])[:20] if isinstance(cfg.get('sorts'), list) else [],
930
  'groupBy': str(cfg['groupBy'])[:120] if isinstance(cfg.get('groupBy'), str) and cfg['groupBy'] else None,
931
  'colorBy': str(cfg['colorBy'])[:120] if isinstance(cfg.get('colorBy'), str) and cfg['colorBy'] else None,
932
- 'rowHeightMode': height if height in ('medium', 'tall') else 'short',
933
  'order': _keys(cfg.get('order'), 400),
934
  'visible': _keys(cfg.get('visible'), 400),
935
  'widths': widths,
@@ -1802,7 +1802,7 @@ def handle_one(event, ctx):
1802
  'groupBy': cfg.get('groupBy') if cfg.get('groupBy') in valid_keys else None,
1803
  'colorBy': cfg.get('colorBy') if cfg.get('colorBy') in valid_keys else None,
1804
  'rowHeightMode': (cfg.get('rowHeightMode')
1805
- if cfg.get('rowHeightMode') in ('short', 'medium', 'tall')
1806
  else 'short'),
1807
  'order': order,
1808
  'visible': visible,
 
929
  'sorts': list(cfg.get('sorts') or [])[:20] if isinstance(cfg.get('sorts'), list) else [],
930
  'groupBy': str(cfg['groupBy'])[:120] if isinstance(cfg.get('groupBy'), str) and cfg['groupBy'] else None,
931
  'colorBy': str(cfg['colorBy'])[:120] if isinstance(cfg.get('colorBy'), str) and cfg['colorBy'] else None,
932
+ 'rowHeightMode': height if height in ('compact', 'medium', 'tall') else 'short',
933
  'order': _keys(cfg.get('order'), 400),
934
  'visible': _keys(cfg.get('visible'), 400),
935
  'widths': widths,
 
1802
  'groupBy': cfg.get('groupBy') if cfg.get('groupBy') in valid_keys else None,
1803
  'colorBy': cfg.get('colorBy') if cfg.get('colorBy') in valid_keys else None,
1804
  'rowHeightMode': (cfg.get('rowHeightMode')
1805
+ if cfg.get('rowHeightMode') in ('compact', 'short', 'medium', 'tall')
1806
  else 'short'),
1807
  'order': order,
1808
  'visible': visible,
web/public/AIOS_DEPLOY_RECEIPT CHANGED
@@ -1 +1 @@
1
- d9d53324b71a6a7fdad9b1e05cd711f03b28db110c39f3f32cec0889232200aa
 
1
+ 2b5e37e505af9009815f8c97c3eef69863fa31a0232fad54cbe845172bca9f7f
web/src/customer-grid/CustomerGrid.tsx CHANGED
@@ -244,7 +244,8 @@ import { ALL_VIEW_ID, MAX_CALENDAR_METRICS, allViewName,
244
  /* ⭐⭐ W41-T42 (owner instruction 23) — the pivot's whole vocabulary is DECLARED in `types.ts`
245
  and only consumed here, because W41-T43 (this file) and W41-T44 (`RecordDetail.tsx`) open the
246
  same feature through other doors and neither of them may edit `types.ts`. */
247
- import { AUDIT_FIELD_TYPES, buildPivotRequest, cleanSecondaryView, emptyViewConfig, PIVOT_PATH, PIVOT_WINDOW_LABELS,
 
248
  pivotRefusalFromBody, pivotResponse, relationalTargets } from "./types";
249
  import type {
250
  ApplicationType,
@@ -263,7 +264,6 @@ import type {
263
  RelatedPin,
264
  RelatedVia,
265
  Row,
266
- RowHeightMode,
267
  SavedView,
268
  SortRule,
269
  ViewConfig,
@@ -298,8 +298,6 @@ export const GRID_CHAT_OPEN_EVENT = "aios:grid-chat-open";
298
  const CUSTOM_RENDERERS = [ratingCellRenderer, userCellRenderer, imageCellRenderer,
299
  chartCellRenderer, barCellRenderer, dotCellRenderer];
300
 
301
- const ROW_PX: Record<RowHeightMode, number> = { short: 28, medium: 34, tall: 48 };
302
-
303
  /**
304
  * W40-T30, 2026-08-24 — W39-T22's virtual "Go" directions column is GONE, removed on owner
305
  * instruction 27: "Remove the 'Go' field for Google Maps. Use the URL field we already have,
@@ -6776,7 +6774,8 @@ function CustomerGridSurface({
6776
  return map;
6777
  }, [fields, rawRows, payload?.userOptions]);
6778
 
6779
- const rowPx = ROW_PX[config.rowHeightMode];
 
6780
  // DISTINCT customers, not painted data rows. Grouping a MULTI field (Cohorts) puts the same
6781
  // customer under every group it belongs to, so counting rows would report more records than
6782
  // there are customers — a number nobody could reconcile against the book. `pidToIndex` is
@@ -6852,7 +6851,7 @@ function CustomerGridSurface({
6852
  // the star book-ended the cell from the LEFT and kept its own LOWER minima, so "a
6853
  // compact row that cannot carry the Expand can still carry this one". That was
6854
  // deliberate then and it is reversed now. The band it protected (rows under 26px) is
6855
- // empty anyway: `ROW_PX` is the whole set of data-row heights, 28 / 34 / 48.
6856
  const starAt = b ? starButtonRect(b, boxRect) : null;
6857
  setStarHover((prev) =>
6858
  !starAt
 
244
  /* ⭐⭐ W41-T42 (owner instruction 23) — the pivot's whole vocabulary is DECLARED in `types.ts`
245
  and only consumed here, because W41-T43 (this file) and W41-T44 (`RecordDetail.tsx`) open the
246
  same feature through other doors and neither of them may edit `types.ts`. */
247
+ import { AUDIT_FIELD_TYPES, buildPivotRequest, cleanSecondaryView, DEFAULT_ROW_HEIGHT_MODE, emptyViewConfig,
248
+ PIVOT_PATH, PIVOT_WINDOW_LABELS, ROW_HEIGHT_PX,
249
  pivotRefusalFromBody, pivotResponse, relationalTargets } from "./types";
250
  import type {
251
  ApplicationType,
 
264
  RelatedPin,
265
  RelatedVia,
266
  Row,
 
267
  SavedView,
268
  SortRule,
269
  ViewConfig,
 
298
  const CUSTOM_RENDERERS = [ratingCellRenderer, userCellRenderer, imageCellRenderer,
299
  chartCellRenderer, barCellRenderer, dotCellRenderer];
300
 
 
 
301
  /**
302
  * W40-T30, 2026-08-24 — W39-T22's virtual "Go" directions column is GONE, removed on owner
303
  * instruction 27: "Remove the 'Go' field for Google Maps. Use the URL field we already have,
 
6774
  return map;
6775
  }, [fields, rawRows, payload?.userOptions]);
6776
 
6777
+ const rowPx = Object.prototype.hasOwnProperty.call(ROW_HEIGHT_PX, config.rowHeightMode)
6778
+ ? ROW_HEIGHT_PX[config.rowHeightMode] : ROW_HEIGHT_PX[DEFAULT_ROW_HEIGHT_MODE];
6779
  // DISTINCT customers, not painted data rows. Grouping a MULTI field (Cohorts) puts the same
6780
  // customer under every group it belongs to, so counting rows would report more records than
6781
  // there are customers — a number nobody could reconcile against the book. `pidToIndex` is
 
6851
  // the star book-ended the cell from the LEFT and kept its own LOWER minima, so "a
6852
  // compact row that cannot carry the Expand can still carry this one". That was
6853
  // deliberate then and it is reversed now. The band it protected (rows under 26px) is
6854
+ // empty anyway: `ROW_HEIGHT_PX` covers 28 / 34 / 48 / 56 px data rows.
6855
  const starAt = b ? starButtonRect(b, boxRect) : null;
6856
  setStarHover((prev) =>
6857
  !starAt
web/src/customer-grid/Toolbar.tsx CHANGED
@@ -31,7 +31,7 @@ import type {
31
  Viewer,
32
  ViewConfig,
33
  } from "./types";
34
- import { viewDisplayMode } from "./types";
35
  // ⭐ W41-T42 — the window vocabulary is DECLARED in types.ts and consumed here, so the toolbar's
36
  // control and the record-level pivot's (W41-T44, `RecordDetail.tsx`) cannot drift apart.
37
  import { PIVOT_WINDOWS, PIVOT_WINDOW_LABELS } from "./types";
@@ -653,9 +653,10 @@ function ImmutableViewConfigNotice({
653
  }
654
 
655
  const ROW_OPTIONS: { mode: RowHeightMode; label: string }[] = [
656
- { mode: "short", label: "Short" },
657
- { mode: "medium", label: "Medium" },
658
- { mode: "tall", label: "Tall" },
 
659
  ];
660
 
661
  export default function Toolbar({
@@ -1125,7 +1126,7 @@ export default function Toolbar({
1125
 
1126
  {/* DOM and CSS share Rows, Edit, Related, Full screen order so keyboard focus follows the strip. */}
1127
  <div className="cg-tb-rows">
1128
- <Popover label="Rows" icon={<IconRows />} active={rowHeightMode !== "short"}>
1129
  {() => (
1130
  <div className="cg-pop-body">
1131
  <div className="cg-pop-title">Row height</div>
 
31
  Viewer,
32
  ViewConfig,
33
  } from "./types";
34
+ import { DEFAULT_ROW_HEIGHT_MODE, ROW_HEIGHT_PX, viewDisplayMode } from "./types";
35
  // ⭐ W41-T42 — the window vocabulary is DECLARED in types.ts and consumed here, so the toolbar's
36
  // control and the record-level pivot's (W41-T44, `RecordDetail.tsx`) cannot drift apart.
37
  import { PIVOT_WINDOWS, PIVOT_WINDOW_LABELS } from "./types";
 
653
  }
654
 
655
  const ROW_OPTIONS: { mode: RowHeightMode; label: string }[] = [
656
+ { mode: "compact", label: `Compact (${ROW_HEIGHT_PX.compact} px)` },
657
+ { mode: "medium", label: `Medium (${ROW_HEIGHT_PX.medium} px)` },
658
+ { mode: "tall", label: `Tall (${ROW_HEIGHT_PX.tall} px)` },
659
+ { mode: "short", label: `Default (${ROW_HEIGHT_PX.short} px)` },
660
  ];
661
 
662
  export default function Toolbar({
 
1126
 
1127
  {/* DOM and CSS share Rows, Edit, Related, Full screen order so keyboard focus follows the strip. */}
1128
  <div className="cg-tb-rows">
1129
+ <Popover label="Rows" icon={<IconRows />} active={rowHeightMode !== DEFAULT_ROW_HEIGHT_MODE}>
1130
  {() => (
1131
  <div className="cg-pop-body">
1132
  <div className="cg-pop-title">Row height</div>
web/src/customer-grid/copyConfig.ts CHANGED
@@ -50,7 +50,7 @@ export const COPY_PARTS: readonly { key: CopyPart; label: string; blurb: string
50
  { key: "groupBy", label: "Groups", blurb: "The field records are bucketed by." },
51
  { key: "visible", label: "Hidden fields", blurb: "Which columns are shown." },
52
  { key: "order", label: "Field order", blurb: "Left-to-right column order." },
53
- { key: "rowHeightMode", label: "Row height", blurb: "Short, medium or tall rows." },
54
  ];
55
 
56
  export const COPY_PART_KEYS: readonly CopyPart[] = COPY_PARTS.map((p) => p.key);
 
50
  { key: "groupBy", label: "Groups", blurb: "The field records are bucketed by." },
51
  { key: "visible", label: "Hidden fields", blurb: "Which columns are shown." },
52
  { key: "order", label: "Field order", blurb: "Left-to-right column order." },
53
+ { key: "rowHeightMode", label: "Row height", blurb: "Compact, medium, tall or default rows." },
54
  ];
55
 
56
  export const COPY_PART_KEYS: readonly CopyPart[] = COPY_PARTS.map((p) => p.key);
web/src/customer-grid/types.ts CHANGED
@@ -3696,7 +3696,14 @@ export function routeStopPosition(cell: unknown, routeLabel: string): number | n
3696
  return null;
3697
  }
3698
 
3699
- export type RowHeightMode = "short" | "medium" | "tall";
 
 
 
 
 
 
 
3700
  export type ThemeMode = "light" | "dark";
3701
 
3702
  export type ApplicationType = "chart" | "route" | "map";
@@ -3918,7 +3925,7 @@ export function emptyViewConfig(): ViewConfig {
3918
  sorts: [],
3919
  groupBy: null,
3920
  colorBy: null,
3921
- rowHeightMode: "short",
3922
  order: [],
3923
  visible: [],
3924
  widths: {},
@@ -3938,8 +3945,8 @@ function cleanPivotConfig(raw: unknown): ViewConfig {
3938
  sorts: Array.isArray(c.sorts) ? (c.sorts as SortSpec) : [],
3939
  groupBy: typeof c.groupBy === "string" && c.groupBy ? c.groupBy : null,
3940
  colorBy: typeof c.colorBy === "string" && c.colorBy ? c.colorBy : null,
3941
- rowHeightMode:
3942
- height === "medium" || height === "tall" ? (height as RowHeightMode) : "short",
3943
  order: Array.isArray(c.order) ? c.order.filter((k): k is string => typeof k === "string") : [],
3944
  visible: Array.isArray(c.visible)
3945
  ? c.visible.filter((k): k is string => typeof k === "string")
 
3696
  return null;
3697
  }
3698
 
3699
+ export type RowHeightMode = "compact" | "medium" | "tall" | "short";
3700
+ export const ROW_HEIGHT_PX: Readonly<Record<RowHeightMode, number>> = {
3701
+ compact: 28,
3702
+ medium: 34,
3703
+ tall: 48,
3704
+ short: 56,
3705
+ };
3706
+ export const DEFAULT_ROW_HEIGHT_MODE: RowHeightMode = "short";
3707
  export type ThemeMode = "light" | "dark";
3708
 
3709
  export type ApplicationType = "chart" | "route" | "map";
 
3925
  sorts: [],
3926
  groupBy: null,
3927
  colorBy: null,
3928
+ rowHeightMode: DEFAULT_ROW_HEIGHT_MODE,
3929
  order: [],
3930
  visible: [],
3931
  widths: {},
 
3945
  sorts: Array.isArray(c.sorts) ? (c.sorts as SortSpec) : [],
3946
  groupBy: typeof c.groupBy === "string" && c.groupBy ? c.groupBy : null,
3947
  colorBy: typeof c.colorBy === "string" && c.colorBy ? c.colorBy : null,
3948
+ rowHeightMode: typeof height === "string" && Object.prototype.hasOwnProperty.call(ROW_HEIGHT_PX, height)
3949
+ ? (height as RowHeightMode) : DEFAULT_ROW_HEIGHT_MODE,
3950
  order: Array.isArray(c.order) ? c.order.filter((k): k is string => typeof k === "string") : [],
3951
  visible: Array.isArray(c.visible)
3952
  ? c.visible.filter((k): k is string => typeof k === "string")
web/src/customer-grid/useGridColumns.ts CHANGED
@@ -1,7 +1,7 @@
1
  import { useCallback, useMemo, useRef } from "react";
2
  import type { GridColumn, Theme } from "@glideapps/glide-data-grid";
3
  import type { Field, FilterNode, ViewConfig } from "./types";
4
- import { isFilterGroup, isMachineOwned, isRuleActive, measureColumnIndex,
5
  ruleColumnKeys } from "./types";
6
  import { typeIconName } from "./iconShapes";
7
  import { fitHeaderTitle, hasShareMark, HEADER_MENU_SLOT, headerLabelSpace,
@@ -268,7 +268,7 @@ export function defaultViewConfig(fields: Field[]): ViewConfig {
268
  sorts: [],
269
  groupBy: null,
270
  colorBy: null,
271
- rowHeightMode: "short",
272
  order: [...shown, ...hidden],
273
  visible: shown,
274
  widths: {},
 
1
  import { useCallback, useMemo, useRef } from "react";
2
  import type { GridColumn, Theme } from "@glideapps/glide-data-grid";
3
  import type { Field, FilterNode, ViewConfig } from "./types";
4
+ import { DEFAULT_ROW_HEIGHT_MODE, isFilterGroup, isMachineOwned, isRuleActive, measureColumnIndex,
5
  ruleColumnKeys } from "./types";
6
  import { typeIconName } from "./iconShapes";
7
  import { fitHeaderTitle, hasShareMark, HEADER_MENU_SLOT, headerLabelSpace,
 
268
  sorts: [],
269
  groupBy: null,
270
  colorBy: null,
271
+ rowHeightMode: DEFAULT_ROW_HEIGHT_MODE,
272
  order: [...shown, ...hidden],
273
  visible: shown,
274
  widths: {},