Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +7 -1
- VERSION +1 -1
- api/routes_customers.py +17 -1
- web/src/customer-grid/MapView.tsx +13 -1
RELEASES.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
{
|
| 5 |
"version": "v63",
|
| 6 |
"sha": "ec75cb8",
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "v64 (bb8985c)",
|
| 3 |
"releases": [
|
| 4 |
+
{
|
| 5 |
+
"version": "v64",
|
| 6 |
+
"sha": "bb8985c",
|
| 7 |
+
"date": "2026-08-31",
|
| 8 |
+
"subject": "release v64"
|
| 9 |
+
},
|
| 10 |
{
|
| 11 |
"version": "v63",
|
| 12 |
"sha": "ec75cb8",
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
v64 (bb8985c)
|
api/routes_customers.py
CHANGED
|
@@ -910,7 +910,23 @@ def _route_dto(route, allowed, active, session, share_mark=None):
|
|
| 910 |
owns_route = bool(session.admin or (
|
| 911 |
mark.get("owner") and mark.get("owner") == str(session.uname or "").strip().lower()))
|
| 912 |
source_edit = _route_view_can_edit(session, route.get("sourceViewId"))
|
| 913 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 914 |
dto = {"id": route["id"], "name": route["name"], "color": route["color"],
|
| 915 |
"number": route["number"], "visibleStopIds": visible,
|
| 916 |
"outsideFilter": bool(active) and not bool(active.intersection(visible)),
|
|
|
|
| 910 |
owns_route = bool(session.admin or (
|
| 911 |
mark.get("owner") and mark.get("owner") == str(session.uname or "").strip().lower()))
|
| 912 |
source_edit = _route_view_can_edit(session, route.get("sourceViewId"))
|
| 913 |
+
# ⛔⛔ HOTFIX 2026-08-31 — THE DTO IS THE UN-FIXED TWIN OF W47-T08 / RULING R6, and it is why
|
| 914 |
+
# the owner's own "Manhattan Route" rendered with no actions and could not be deleted on live.
|
| 915 |
+
# R6 made OWNERSHIP A SHORT-CIRCUIT in `_route_mutation_allowed` above, and both doors that
|
| 916 |
+
# actually mutate a Route (PATCH `update_route`, DELETE `remove_route`) call only that. This
|
| 917 |
+
# line kept the retired `owner AND source_edit` join, so a Route whose `sourceViewId` is a
|
| 918 |
+
# pinned, private, synthetic or deleted view id came back with `capabilities.edit/delete`
|
| 919 |
+
# false — `RouteNav.tsx` hides every action behind `capabilities?.[action] === true`, so the
|
| 920 |
+
# row rendered a DIFFERENT SHAPE from its siblings and offered no delete, while the server
|
| 921 |
+
# would have allowed both. The client was stricter than the rule the server enforces.
|
| 922 |
+
#
|
| 923 |
+
# ⚠ THIS GRANTS NO NEW AUTHORITY. The three branches below are `_route_mutation_allowed`'s
|
| 924 |
+
# three passing branches, in its order: the owner (or an admin, already folded into
|
| 925 |
+
# `owns_route`), an explicit `edit` share on the Route, then an editor of the source View.
|
| 926 |
+
# `can_duplicate` stays `source_edit` alone, because `duplicate_route` genuinely does raise
|
| 927 |
+
# `route_view_read_only` without it — that door is not the one R6 corrected.
|
| 928 |
+
can_edit = bool(not compatibility and (
|
| 929 |
+
owns_route or mark.get("sharedRole") == "edit" or source_edit))
|
| 930 |
dto = {"id": route["id"], "name": route["name"], "color": route["color"],
|
| 931 |
"number": route["number"], "visibleStopIds": visible,
|
| 932 |
"outsideFilter": bool(active) and not bool(active.intersection(visible)),
|
web/src/customer-grid/MapView.tsx
CHANGED
|
@@ -1428,7 +1428,19 @@ export function MapView({
|
|
| 1428 |
}, [activeZones]);
|
| 1429 |
const routeSources = useMemo<MapRouteSource[]>(() => [
|
| 1430 |
{ id: "selection", label: "Current selection", pids: routeSourceStopIds(selectedPids) },
|
| 1431 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1432 |
// ⭐ W47-T06 / instruction 7. THIS IS A MOVE, NOT A NEW QUERY. `rows` is exactly what the
|
| 1433 |
// retired "Select all N filtered records" button read, so the picker now offers the same
|
| 1434 |
// capability in the one place a person is already choosing what the Route is made of. The
|
|
|
|
| 1428 |
}, [activeZones]);
|
| 1429 |
const routeSources = useMemo<MapRouteSource[]>(() => [
|
| 1430 |
{ id: "selection", label: "Current selection", pids: routeSourceStopIds(selectedPids) },
|
| 1431 |
+
// ⛔ HOTFIX 2026-08-31, owner instruction: *"when I create a new route and I select
|
| 1432 |
+
// 'Selected Zones' it still selects literally everything in the zone. it shouldn't, it should
|
| 1433 |
+
// be scoped to the View's current Filter as well. So its always Filter and then what is in the
|
| 1434 |
+
// zone."*
|
| 1435 |
+
//
|
| 1436 |
+
// A Zone's `memberships` is the WHOLE zone: it is computed server-side against the table
|
| 1437 |
+
// (`route_system.zone_members` over the permission-scoped rows), never against the View the
|
| 1438 |
+
// person is looking at. Offering that set raw meant every filter they had just set was
|
| 1439 |
+
// discarded the moment they picked this source. The source is now FILTER ∩ ZONE, and it is
|
| 1440 |
+
// walked in `rows` order rather than membership order so the stop order matches the grid
|
| 1441 |
+
// exactly the way "Current filtered records" below already does.
|
| 1442 |
+
{ id: "zones", label: "Selected Zones",
|
| 1443 |
+
pids: routeSourceStopIds(rows.filter((row) => activeZonePids.has(row.pid)).map((row) => row.pid)) },
|
| 1444 |
// ⭐ W47-T06 / instruction 7. THIS IS A MOVE, NOT A NEW QUERY. `rows` is exactly what the
|
| 1445 |
// retired "Select all N filtered records" button read, so the picker now offers the same
|
| 1446 |
// capability in the one place a person is already choosing what the Route is made of. The
|