fsanyoto commited on
Commit
fecd878
·
verified ·
1 Parent(s): 3289587

Deploy AIOS web (React glide grid + FastAPI slice)

Browse files
RELEASES.json CHANGED
@@ -1,4 +1,4 @@
1
  {
2
- "current": "e9d79f3a7",
3
  "releases": []
4
  }
 
1
  {
2
+ "current": "5421671fc",
3
  "releases": []
4
  }
VERSION CHANGED
@@ -1 +1 @@
1
- e9d79f3a7
 
1
+ 5421671fc
web/public/AIOS_DEPLOY_RECEIPT CHANGED
@@ -1 +1 @@
1
- 390e2445a48971e9d7723fee07c9c0e38d5a6394c079b38150ca199d9200a60e
 
1
+ 34008402d188fda61da283b8fd3b39938cc46f1816999a03f5112cff6f13b39e
web/src/customer-grid/RouteNav.tsx CHANGED
@@ -389,19 +389,13 @@ function RouteNavContent({ routes, folders, selectedIds, activeRouteId, sources,
389
  const [mapCopyError, setMapCopyError] = useState<string | null>(null);
390
  const route = activeRouteId ? routes.find((item) => item.id === activeRouteId) : null;
391
  const rail = useRef<HTMLElement>(null);
392
- const routePanel = useRef<HTMLElement>(null);
393
  const listScroll = useRef(0);
394
  const previousRouteId = useRef<string | null>(null);
395
  useLayoutEffect(() => {
396
  if (!applicationName) return;
397
- const scroll = rail.current?.closest<HTMLElement>(".cg-route-panel-scroll");
398
- if (!scroll) return;
399
- if (route && routePanel.current) {
400
- if (previousRouteId.current === null) listScroll.current = scroll.scrollTop;
401
- scroll.scrollTop += routePanel.current.getBoundingClientRect().top - scroll.getBoundingClientRect().top;
402
- } else if (previousRouteId.current !== null) {
403
- scroll.scrollTop = listScroll.current;
404
- }
405
  previousRouteId.current = route?.id ?? null;
406
  }, [applicationName, route?.id]);
407
  const source = sources.find((item) => item.id === sourceId) || sources[0];
@@ -1111,7 +1105,7 @@ function RouteNavContent({ routes, folders, selectedIds, activeRouteId, sources,
1111
  }).finally(() => setBusy(false));
1112
  };
1113
  return (
1114
- <section ref={routePanel} className="cg-w44-route-nav" aria-label={`${route.name} route`}>
1115
  <div className="cg-route-primary-actions" aria-label="Route actions">
1116
  <button type="button" className="cg-w44-route-back" onClick={backToRoutes}>
1117
  Back to routes
@@ -1928,7 +1922,10 @@ function RouteNavContent({ routes, folders, selectedIds, activeRouteId, sources,
1928
  aria-label={`Show ${item.name} on the map`}
1929
  onChange={() => onToggle(item)} />
1930
  </label>
1931
- <button type="button" className="cg-view-main" onClick={() => {
 
 
 
1932
  setError(null); setCreating(false); onActiveRouteChange(item.id);
1933
  }}>
1934
  {/* Owner item 3: the ONE difference from a view row. Every Route wears the same
@@ -2028,7 +2025,8 @@ function RouteNavContent({ routes, folders, selectedIds, activeRouteId, sources,
2028
  </div>}
2029
  {error && <span className="cg-w44-route-warning" role="status">{error}</span>}
2030
  </div>
2031
- <div className="cg-route-index-scroll" role="region" aria-label="Saved routes" tabIndex={0}>
 
2032
  <div className="cg-find-view">
2033
  <svg className="cg-find-view-icon" width="14" height="14" viewBox="0 0 16 16" fill="none"
2034
  aria-hidden="true">
@@ -2063,8 +2061,8 @@ function RouteNavContent({ routes, folders, selectedIds, activeRouteId, sources,
2063
  );
2064
  return (
2065
  <section ref={rail} className="cg-w44-route-nav" aria-label="Named routes">
2066
- {inventory}
2067
- {routeDetail()}
2068
  {/* ⛔ RENDERED FROM THE COMPONENT ROOT, OUTSIDE `renderLevel` AND OUTSIDE EVERY MENU
2069
  CONDITIONAL. See the note over `pendingDelete`: a dialog inside the menu subtree that
2070
  set it would never paint. `ConfirmDialog` portals to <body> itself, so its position in
 
389
  const [mapCopyError, setMapCopyError] = useState<string | null>(null);
390
  const route = activeRouteId ? routes.find((item) => item.id === activeRouteId) : null;
391
  const rail = useRef<HTMLElement>(null);
392
+ // ⚠ The Routes list unmounts while a Route is open, so its scroll is kept here for Back.
393
  const listScroll = useRef(0);
394
  const previousRouteId = useRef<string | null>(null);
395
  useLayoutEffect(() => {
396
  if (!applicationName) return;
397
+ const list = rail.current?.querySelector<HTMLElement>(".cg-route-index-scroll");
398
+ if (!route && previousRouteId.current !== null && list) list.scrollTop = listScroll.current;
 
 
 
 
 
 
399
  previousRouteId.current = route?.id ?? null;
400
  }, [applicationName, route?.id]);
401
  const source = sources.find((item) => item.id === sourceId) || sources[0];
 
1105
  }).finally(() => setBusy(false));
1106
  };
1107
  return (
1108
+ <section className="cg-w44-route-nav" aria-label={`${route.name} route`}>
1109
  <div className="cg-route-primary-actions" aria-label="Route actions">
1110
  <button type="button" className="cg-w44-route-back" onClick={backToRoutes}>
1111
  Back to routes
 
1922
  aria-label={`Show ${item.name} on the map`}
1923
  onChange={() => onToggle(item)} />
1924
  </label>
1925
+ <button type="button" className="cg-view-main" onClick={(event) => {
1926
+ // ⚠ Read the scroll at the click: the last `onScroll` can land a frame late.
1927
+ const list = event.currentTarget.closest<HTMLElement>(".cg-route-index-scroll");
1928
+ if (list) listScroll.current = list.scrollTop;
1929
  setError(null); setCreating(false); onActiveRouteChange(item.id);
1930
  }}>
1931
  {/* Owner item 3: the ONE difference from a view row. Every Route wears the same
 
2025
  </div>}
2026
  {error && <span className="cg-w44-route-warning" role="status">{error}</span>}
2027
  </div>
2028
+ <div className="cg-route-index-scroll" role="region" aria-label="Saved routes" tabIndex={0}
2029
+ onScroll={(event) => { listScroll.current = event.currentTarget.scrollTop; }}>
2030
  <div className="cg-find-view">
2031
  <svg className="cg-find-view-icon" width="14" height="14" viewBox="0 0 16 16" fill="none"
2032
  aria-hidden="true">
 
2061
  );
2062
  return (
2063
  <section ref={rail} className="cg-w44-route-nav" aria-label="Named routes">
2064
+ {/* ⛔ An open Route REPLACES the Routes list: Back to routes is its only way out. */}
2065
+ {route ? routeDetail() : inventory}
2066
  {/* ⛔ RENDERED FROM THE COMPONENT ROOT, OUTSIDE `renderLevel` AND OUTSIDE EVERY MENU
2067
  CONDITIONAL. See the note over `pendingDelete`: a dialog inside the menu subtree that
2068
  set it would never paint. `ConfirmDialog` portals to <body> itself, so its position in
web/src/styles/wave42/route-nav.css CHANGED
@@ -695,7 +695,7 @@
695
  padding: 0;
696
  }
697
 
698
- /* Saved Routes keep their own region above the open Route. */
699
  .cg-mapview.cg-app-route-surface > .cg-map-stage > #cg-route-popover > .cg-route-panel-scroll > .cg-w44-route-nav {
700
  display: grid;
701
  grid-template-rows: auto minmax(0, 1fr);
@@ -706,7 +706,7 @@
706
  }
707
 
708
  .cg-mapview.cg-app-route-surface > .cg-map-stage > #cg-route-popover > .cg-route-panel-scroll > .cg-w44-route-nav:has(> .cg-w44-route-nav) {
709
- grid-template-rows: auto minmax(88px, 1fr) minmax(0, 2fr);
710
  }
711
 
712
  .cg-mapview.cg-app-route-surface > .cg-map-stage > #cg-route-popover .cg-route-index-scroll,
 
695
  padding: 0;
696
  }
697
 
698
+ /* The Routes list and its actions share the rail until a Route opens in their place. */
699
  .cg-mapview.cg-app-route-surface > .cg-map-stage > #cg-route-popover > .cg-route-panel-scroll > .cg-w44-route-nav {
700
  display: grid;
701
  grid-template-rows: auto minmax(0, 1fr);
 
706
  }
707
 
708
  .cg-mapview.cg-app-route-surface > .cg-map-stage > #cg-route-popover > .cg-route-panel-scroll > .cg-w44-route-nav:has(> .cg-w44-route-nav) {
709
+ grid-template-rows: minmax(0, 1fr);
710
  }
711
 
712
  .cg-mapview.cg-app-route-surface > .cg-map-stage > #cg-route-popover .cg-route-index-scroll,