Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +7 -1
- VERSION +1 -1
- web/src/customer-grid/CustomerGrid.tsx +87 -2
- web/src/customer-grid/iconShapes.ts +20 -6
RELEASES.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
{
|
| 5 |
"version": "v15",
|
| 6 |
"sha": "6b84d72",
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "v16 (a804df5)",
|
| 3 |
"releases": [
|
| 4 |
+
{
|
| 5 |
+
"version": "v16",
|
| 6 |
+
"sha": "a804df5",
|
| 7 |
+
"date": "2026-08-09",
|
| 8 |
+
"subject": "release v16"
|
| 9 |
+
},
|
| 10 |
{
|
| 11 |
"version": "v15",
|
| 12 |
"sha": "6b84d72",
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
v16 (a804df5)
|
web/src/customer-grid/CustomerGrid.tsx
CHANGED
|
@@ -74,6 +74,8 @@ import type { FieldStamps } from "./optimism";
|
|
| 74 |
import { evalFormula, orderFormulas, parseFormula } from "./formulaEngine";
|
| 75 |
import type { FormulaAst } from "./formulaEngine";
|
| 76 |
import { CalendarView, KanbanView, ListView, ModeSwitch } from "./viewModes";
|
|
|
|
|
|
|
| 77 |
// The chart engine lives in `viz/` since EXIT wave 2 (W2-5/Y3) β the grid is now
|
| 78 |
// one of its two callers, the Y1 page envelope being the other.
|
| 79 |
import { DashboardView } from "../viz/DashboardView";
|
|
@@ -2313,8 +2315,12 @@ function CustomerGrid({
|
|
| 2313 |
// grid/list (the cap is real there), the FULL pipeline for calendar/kanban/map (a month, a
|
| 2314 |
// stack or a pin reaches past the cap by design β a drawer that refused those pids would
|
| 2315 |
// close itself on a card the user can plainly see).
|
|
|
|
|
|
|
|
|
|
| 2316 |
const fullSetMode =
|
| 2317 |
-
displayMode === "calendar" || displayMode === "kanban" || displayMode === "map"
|
|
|
|
| 2318 |
const detailRows = fullSetMode ? visibleRows : displayRows;
|
| 2319 |
const detailIdxMap = fullSetMode ? pidToIndex : displayPidToIndex;
|
| 2320 |
const detailIndex = detailPid !== null ? detailIdxMap.get(detailPid) : undefined;
|
|
@@ -4080,6 +4086,25 @@ function CustomerGrid({
|
|
| 4080 |
},
|
| 4081 |
[config, updateConfig]
|
| 4082 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4083 |
/**
|
| 4084 |
* Item 4 (C-DISP) β the per-day totals. An EMPTY list deletes the key rather than storing
|
| 4085 |
* `[]`: the always-on Records count is what an absent list means, so `[]` would be that
|
|
@@ -4167,6 +4192,14 @@ function CustomerGrid({
|
|
| 4167 |
: undefined;
|
| 4168 |
const calendarField = pickBy(displaySpec?.dateField, dateFieldChoices, "last_order");
|
| 4169 |
const kanbanField = pickBy(displaySpec?.stackField, stackFieldChoices);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4170 |
// Calendar/kanban project the FULL pipeline result (a month/stack is its own bound), as
|
| 4171 |
// DISTINCT data rows β grouping can repeat a pid β with overlay edits layered so a dragged
|
| 4172 |
// card restacks and an edited title repaints without waiting on any echo (item 3c).
|
|
@@ -4185,7 +4218,12 @@ function CustomerGrid({
|
|
| 4185 |
which products the filter kept. The catalog's PAINT does not: it joins its stored
|
| 4186 |
codes against the whole pool, so a filter narrows what you can ADD and never what a
|
| 4187 |
finished page prints. βββ end W18-C CATALOG βββ */
|
| 4188 |
-
displayMode !== "catalog"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4189 |
)
|
| 4190 |
return [];
|
| 4191 |
const seen = new Set<number>();
|
|
@@ -4219,6 +4257,16 @@ function CustomerGrid({
|
|
| 4219 |
},
|
| 4220 |
[kanbanField, patchAndRecord]
|
| 4221 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4222 |
/**
|
| 4223 |
* β WAVE-26 ITEM 12 (owner ruling R8) β the kanban's "Add option" door.
|
| 4224 |
*
|
|
@@ -4332,6 +4380,16 @@ function CustomerGrid({
|
|
| 4332 |
: !canEditField(kanbanField)
|
| 4333 |
? "You do not have permission to edit this field, so cards cannot be moved."
|
| 4334 |
: null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4335 |
|
| 4336 |
if (loading || !workspaceReady) {
|
| 4337 |
/* wave17 GRID β item 3 / owner R6: one small bare rotating icon, NO WORDS. `aria-label`
|
|
@@ -4971,6 +5029,33 @@ function CustomerGrid({
|
|
| 4971 |
This table has no status or single-select field to stack by.
|
| 4972 |
</div>
|
| 4973 |
))}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4974 |
{/* Wave-8 I19c β wave-9 I10 (C2) β CHART is a VIEW like the rest: the charts
|
| 4975 |
are computed from `modeDataRows`, the very rows the grid counts, so a filter
|
| 4976 |
change moves the charts and the toolbar count together.
|
|
|
|
| 74 |
import { evalFormula, orderFormulas, parseFormula } from "./formulaEngine";
|
| 75 |
import type { FormulaAst } from "./formulaEngine";
|
| 76 |
import { CalendarView, KanbanView, ListView, ModeSwitch } from "./viewModes";
|
| 77 |
+
import { SwipeView } from "./SwipeView";
|
| 78 |
+
import type { SwipeSpec } from "./SwipeView";
|
| 79 |
// The chart engine lives in `viz/` since EXIT wave 2 (W2-5/Y3) β the grid is now
|
| 80 |
// one of its two callers, the Y1 page envelope being the other.
|
| 81 |
import { DashboardView } from "../viz/DashboardView";
|
|
|
|
| 2315 |
// grid/list (the cap is real there), the FULL pipeline for calendar/kanban/map (a month, a
|
| 2316 |
// stack or a pin reaches past the cap by design β a drawer that refused those pids would
|
| 2317 |
// close itself on a card the user can plainly see).
|
| 2318 |
+
// β WAVE-27 item 8 (C3) β `swipe` belongs here for calendar/kanban/map's own reason: the deck
|
| 2319 |
+
// is derived from `modeDataRows` (the FULL pipeline), so a card past the display cap is one
|
| 2320 |
+
// the user can plainly see, and a drawer that refused its pid would close itself on open.
|
| 2321 |
const fullSetMode =
|
| 2322 |
+
displayMode === "calendar" || displayMode === "kanban" || displayMode === "map" ||
|
| 2323 |
+
displayMode === "swipe";
|
| 2324 |
const detailRows = fullSetMode ? visibleRows : displayRows;
|
| 2325 |
const detailIdxMap = fullSetMode ? pidToIndex : displayPidToIndex;
|
| 2326 |
const detailIndex = detailPid !== null ? detailIdxMap.get(detailPid) : undefined;
|
|
|
|
| 4086 |
},
|
| 4087 |
[config, updateConfig]
|
| 4088 |
);
|
| 4089 |
+
/**
|
| 4090 |
+
* β WAVE-27 item 8 (owner ruling R2, contract C3) β the swipe BINDING.
|
| 4091 |
+
*
|
| 4092 |
+
* β `undefined` DELETES the key, for `setKanbanClamp`'s reason one step further on. A swipe
|
| 4093 |
+
* binding is a single three-part thing (field + two options); both engines' `_clean_display`
|
| 4094 |
+
* DROP a half-binding rather than storing it, so writing one back would look like a save that
|
| 4095 |
+
* silently did not persist. Absent IS the unconfigured state.
|
| 4096 |
+
*/
|
| 4097 |
+
const setSwipeSpec = useCallback(
|
| 4098 |
+
(next: SwipeSpec | undefined) => {
|
| 4099 |
+
const spec = cleanDisplay(config.display);
|
| 4100 |
+
if (!spec) return;
|
| 4101 |
+
const display = { ...spec };
|
| 4102 |
+
if (next) display.swipe = next;
|
| 4103 |
+
else delete (display as Record<string, unknown>).swipe;
|
| 4104 |
+
updateConfig({ ...config, display });
|
| 4105 |
+
},
|
| 4106 |
+
[config, updateConfig]
|
| 4107 |
+
);
|
| 4108 |
/**
|
| 4109 |
* Item 4 (C-DISP) β the per-day totals. An EMPTY list deletes the key rather than storing
|
| 4110 |
* `[]`: the always-on Records count is what an absent list means, so `[]` would be that
|
|
|
|
| 4192 |
: undefined;
|
| 4193 |
const calendarField = pickBy(displaySpec?.dateField, dateFieldChoices, "last_order");
|
| 4194 |
const kanbanField = pickBy(displaySpec?.stackField, stackFieldChoices);
|
| 4195 |
+
/* β WAVE-27 item 8 (C3) β the BOUND field, resolved by key and NOT through `pickBy`. `pickBy`
|
| 4196 |
+
falls back to the first choice when the stored key is unknown, which is right for a kanban
|
| 4197 |
+
(a stack field is a preference) and wrong here: SwipeView SHOWS a rotted binding rather than
|
| 4198 |
+
guessing at one, so it must receive the loss instead of a silent substitute β the wave-7 trap
|
| 4199 |
+
[[wrong-parent-not-broken-control]] and the component's own header note both name. */
|
| 4200 |
+
const swipeField = displaySpec?.swipe
|
| 4201 |
+
? fieldByKey.get(displaySpec.swipe.fieldKey)
|
| 4202 |
+
: undefined;
|
| 4203 |
// Calendar/kanban project the FULL pipeline result (a month/stack is its own bound), as
|
| 4204 |
// DISTINCT data rows β grouping can repeat a pid β with overlay edits layered so a dragged
|
| 4205 |
// card restacks and an edited title repaints without waiting on any echo (item 3c).
|
|
|
|
| 4218 |
which products the filter kept. The catalog's PAINT does not: it joins its stored
|
| 4219 |
codes against the whole pool, so a filter narrows what you can ADD and never what a
|
| 4220 |
finished page prints. βββ end W18-C CATALOG βββ */
|
| 4221 |
+
displayMode !== "catalog" &&
|
| 4222 |
+
/* β WAVE-27 item 8 (C3) β the swipe deck is these rows filtered to the undecided ones.
|
| 4223 |
+
Without this line the deck is derived from `[]`, so the view paints its "nothing left
|
| 4224 |
+
to decide" empty state over a table full of undecided records β the C-TS stitch above,
|
| 4225 |
+
repeated. */
|
| 4226 |
+
displayMode !== "swipe"
|
| 4227 |
)
|
| 4228 |
return [];
|
| 4229 |
const seen = new Set<number>();
|
|
|
|
| 4257 |
},
|
| 4258 |
[kanbanField, patchAndRecord]
|
| 4259 |
);
|
| 4260 |
+
/* β WAVE-27 item 8 (C3) β a swipe writes through the NORMAL cell door, the same
|
| 4261 |
+
`patchAndRecord` a card move uses. That is the whole reason the deck needs no permission
|
| 4262 |
+
logic, no undo entry and no echo handling of its own: it inherits all three. */
|
| 4263 |
+
const onSwipeDecide = useCallback(
|
| 4264 |
+
(pid: number, value: string) => {
|
| 4265 |
+
if (!swipeField) return;
|
| 4266 |
+
patchAndRecord(pid, { [swipeField.key]: value }, "a swipe");
|
| 4267 |
+
},
|
| 4268 |
+
[swipeField, patchAndRecord]
|
| 4269 |
+
);
|
| 4270 |
/**
|
| 4271 |
* β WAVE-26 ITEM 12 (owner ruling R8) β the kanban's "Add option" door.
|
| 4272 |
*
|
|
|
|
| 4380 |
: !canEditField(kanbanField)
|
| 4381 |
? "You do not have permission to edit this field, so cards cannot be moved."
|
| 4382 |
: null;
|
| 4383 |
+
/* β WAVE-27 item 8 (C3) β the kanban pair, said again for the deck. Same wall, same words
|
| 4384 |
+
shaped for the gesture: a swipe writes a VALUE, so `canEditField` is the right predicate. */
|
| 4385 |
+
const swipeCanWrite = !!swipeField && swipeField.type === "select" && canEditField(swipeField);
|
| 4386 |
+
const swipeReason = !swipeField
|
| 4387 |
+
? null
|
| 4388 |
+
: swipeField.type === "status"
|
| 4389 |
+
? `Bound to ${swipeField.label} β read-only, computed from the source system.`
|
| 4390 |
+
: !canEditField(swipeField)
|
| 4391 |
+
? "You do not have permission to edit this field, so records cannot be decided."
|
| 4392 |
+
: null;
|
| 4393 |
|
| 4394 |
if (loading || !workspaceReady) {
|
| 4395 |
/* wave17 GRID β item 3 / owner R6: one small bare rotating icon, NO WORDS. `aria-label`
|
|
|
|
| 5029 |
This table has no status or single-select field to stack by.
|
| 5030 |
</div>
|
| 5031 |
))}
|
| 5032 |
+
{/* β WAVE-27 item 8 (owner ruling R2, contract C3) β the SWIPE deck.
|
| 5033 |
+
β No `field ? ... : empty-state` fork, and the asymmetry with kanban above is
|
| 5034 |
+
deliberate. A kanban with no select field cannot exist, so the host answers for it.
|
| 5035 |
+
A swipe deck with no binding is the ORDINARY state of a view somebody just created,
|
| 5036 |
+
and SwipeView owns that state along with the three ways a stored binding rots β
|
| 5037 |
+
each one re-opening the picker rather than being repaired by a guess. Forking here
|
| 5038 |
+
would put a second, dumber explanation in front of the good one. */}
|
| 5039 |
+
{displayMode === "swipe" && (
|
| 5040 |
+
<SwipeView
|
| 5041 |
+
rows={modeDataRows}
|
| 5042 |
+
fields={fields}
|
| 5043 |
+
fieldByKey={fieldByKey}
|
| 5044 |
+
spec={displaySpec?.swipe}
|
| 5045 |
+
cardKeys={kanbanCardKeys}
|
| 5046 |
+
titleKey={lockedKey}
|
| 5047 |
+
canWrite={swipeCanWrite}
|
| 5048 |
+
readOnlyReason={swipeReason}
|
| 5049 |
+
/* β NOT `swipeCanWrite`. Binding the deck changes the VIEW's config; writing a
|
| 5050 |
+
cell changes a VALUE. Conflating them is [[schema-role-is-not-a-value-wall]],
|
| 5051 |
+
and the two genuinely differ here β a viewer with a read-only grant on a shared
|
| 5052 |
+
view may still decide records through it. */
|
| 5053 |
+
canBind={!!activeView && mayEditView(activeView, viewer)}
|
| 5054 |
+
onSpec={setSwipeSpec}
|
| 5055 |
+
onSwipe={onSwipeDecide}
|
| 5056 |
+
onOpen={setDetailPid}
|
| 5057 |
+
/>
|
| 5058 |
+
)}
|
| 5059 |
{/* Wave-8 I19c β wave-9 I10 (C2) β CHART is a VIEW like the rest: the charts
|
| 5060 |
are computed from `modeDataRows`, the very rows the grid counts, so a filter
|
| 5061 |
change moves the charts and the toolbar count together.
|
web/src/customer-grid/iconShapes.ts
CHANGED
|
@@ -443,12 +443,25 @@ export const MODE_LABELS: Record<DisplayMode, string> = {
|
|
| 443 |
// a grid under a chip reading "View Β· Swipe" β surviving reload, with the agreement leg green
|
| 444 |
// because it only ever compared two lists.
|
| 445 |
//
|
| 446 |
-
// So the hold
|
| 447 |
-
//
|
| 448 |
-
// `CustomerGrid.tsx` mounts `SwipeView`
|
| 449 |
-
//
|
| 450 |
-
//
|
| 451 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 452 |
export const CREATABLE_MODES: DisplayMode[] = [
|
| 453 |
"grid",
|
| 454 |
"chart",
|
|
@@ -458,6 +471,7 @@ export const CREATABLE_MODES: DisplayMode[] = [
|
|
| 458 |
"map",
|
| 459 |
"list",
|
| 460 |
"catalog",
|
|
|
|
| 461 |
];
|
| 462 |
|
| 463 |
export const MODE_TONE: Record<DisplayMode, FolderTone> = {
|
|
|
|
| 443 |
// a grid under a chip reading "View Β· Swipe" β surviving reload, with the agreement leg green
|
| 444 |
// because it only ever compared two lists.
|
| 445 |
//
|
| 446 |
+
// So the hold stood until `SwipeView` was mounted (contract C3), and it was not a mailbox
|
| 447 |
+
// handshake: `verify_icons` DERIVES the condition β either `swipe` is absent here, or
|
| 448 |
+
// `CustomerGrid.tsx` mounts `SwipeView`. `form` (wave-23) is the same defect from the other
|
| 449 |
+
// direction, sitting unoffered because its host mirror never landed (DEBT D-90).
|
| 450 |
+
//
|
| 451 |
+
// β THE HOLD OUTLIVED THE WAVE, AND THAT IS THE LESSON WORTH MORE THAN THE FEATURE.
|
| 452 |
+
// Wave 27 closed with the mount NEVER LANDING. `SwipeView.tsx` shipped, the server accepted
|
| 453 |
+
// `swipe`, all four maps above carried it, 50 gates were green, the wave-27 mailbox recorded
|
| 454 |
+
// "RESOLVED BY C (swipe mounted)", the close-out booked D-102 β a negative control FOR the
|
| 455 |
+
// swipe carry β and the owner could not find the view because **nothing imported the file.**
|
| 456 |
+
// The derived gate could not catch it: its condition is a DISJUNCTION and **absence satisfies
|
| 457 |
+
// it**, so the unshipped state was permanently green ([[gate-can-report-green-on-nothing]]).
|
| 458 |
+
// A hold that is safe to leave in place is a hold nothing forces you to lift.
|
| 459 |
+
// The audit query that found it, after the battery did not: for each artifact a wave adds, grep
|
| 460 |
+
// for its CONSUMER β who imports/mounts/registers it β excluding the file itself, `_test/`, css
|
| 461 |
+
// and comments. `SwipeView` had four hits and three were prose.
|
| 462 |
+
// Mounted 2026-08-09 (`CustomerGrid.tsx`, `displayMode === "swipe"`), so `swipe` is offerable.
|
| 463 |
+
// It lands LAST, by `catalog`'s rule: the owner's mode order is a product decision and a new
|
| 464 |
+
// mode joins the end of it rather than being sorted into it.
|
| 465 |
export const CREATABLE_MODES: DisplayMode[] = [
|
| 466 |
"grid",
|
| 467 |
"chart",
|
|
|
|
| 471 |
"map",
|
| 472 |
"list",
|
| 473 |
"catalog",
|
| 474 |
+
"swipe",
|
| 475 |
];
|
| 476 |
|
| 477 |
export const MODE_TONE: Record<DisplayMode, FolderTone> = {
|