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
- platform/aios_grid.py +26 -1
- web/src/customer-grid/useGridColumns.ts +32 -1
RELEASES.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
{
|
| 5 |
"version": "v51",
|
| 6 |
"sha": "5740d20",
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "v52 (8263493)",
|
| 3 |
"releases": [
|
| 4 |
+
{
|
| 5 |
+
"version": "v52",
|
| 6 |
+
"sha": "8263493",
|
| 7 |
+
"date": "2026-08-23",
|
| 8 |
+
"subject": "release v52"
|
| 9 |
+
},
|
| 10 |
{
|
| 11 |
"version": "v51",
|
| 12 |
"sha": "5740d20",
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
v52 (8263493)
|
platform/aios_grid.py
CHANGED
|
@@ -2252,6 +2252,28 @@ def clean_filter_tree(raw, valid_keys, depth=1, budget=None, cohort_ids=None,
|
|
| 2252 |
return out
|
| 2253 |
|
| 2254 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2255 |
def _default_view_config(fields):
|
| 2256 |
# ββ W30-T41's SERVER HALF (F's ask F-1, answered by D β this file is D's fence).
|
| 2257 |
#
|
|
@@ -2272,7 +2294,10 @@ def _default_view_config(fields):
|
|
| 2272 |
# carve-out for the four Odoo keys: it carries no `default` key at all, so `is not False`
|
| 2273 |
# keeps it visible. On the main Customer grid exactly one field moves β `notes`, which asks
|
| 2274 |
# to be hidden in its own declaration and was being shown against it.
|
| 2275 |
-
|
|
|
|
|
|
|
|
|
|
| 2276 |
hidden = [field["key"] for field in fields if field["key"] not in shown]
|
| 2277 |
return {
|
| 2278 |
# `filters` is the ROOT of the filter tree: leaf conditions and/or nested
|
|
|
|
| 2252 |
return out
|
| 2253 |
|
| 2254 |
|
| 2255 |
+
def _is_default_visible(field):
|
| 2256 |
+
"""Does this column open SHOWN in a view that has never recorded its own `visible`?
|
| 2257 |
+
|
| 2258 |
+
ββ OWNER, 2026-08-23: *"when any new View is created only shareable pre-set data should
|
| 2259 |
+
show. Shared to me or Shared to everyone should be auto hidden."*
|
| 2260 |
+
|
| 2261 |
+
β THE CLIENT TWIN IS `useGridColumns.isDefaultVisible` AND IT MUST SAY THE SAME THING. The
|
| 2262 |
+
note inside `_default_view_config` below is the record of what happens when it does not:
|
| 2263 |
+
`CustomerGrid` compares the stored system view against its own `defaultViewConfig` by JSON
|
| 2264 |
+
equality, so a disagreement here is a view that looks permanently dirty and autosaves for
|
| 2265 |
+
ever. The reasoning for the predicate itself lives in the client file, once.
|
| 2266 |
+
|
| 2267 |
+
β `custom or shared` is the same membership test `FieldsHidePanel` uses to draw BOTH of its
|
| 2268 |
+
shared headings, so hiding on it covers both without a second list of section names.
|
| 2269 |
+
"""
|
| 2270 |
+
if field.get("default") is False:
|
| 2271 |
+
return False
|
| 2272 |
+
if field.get("custom") is True or field.get("shared") is True:
|
| 2273 |
+
return False
|
| 2274 |
+
return True
|
| 2275 |
+
|
| 2276 |
+
|
| 2277 |
def _default_view_config(fields):
|
| 2278 |
# ββ W30-T41's SERVER HALF (F's ask F-1, answered by D β this file is D's fence).
|
| 2279 |
#
|
|
|
|
| 2294 |
# carve-out for the four Odoo keys: it carries no `default` key at all, so `is not False`
|
| 2295 |
# keeps it visible. On the main Customer grid exactly one field moves β `notes`, which asks
|
| 2296 |
# to be hidden in its own declaration and was being shown against it.
|
| 2297 |
+
# ββ OWNER, 2026-08-23 β ONLY PRE-SET DATA OPENS SHOWN. The client twin is
|
| 2298 |
+
# `useGridColumns.isDefaultVisible` and it carries this comment's argument in full; the two
|
| 2299 |
+
# MUST move together, which is the whole subject of the note above.
|
| 2300 |
+
shown = [field["key"] for field in fields if _is_default_visible(field)]
|
| 2301 |
hidden = [field["key"] for field in fields if field["key"] not in shown]
|
| 2302 |
return {
|
| 2303 |
# `filters` is the ROOT of the filter tree: leaf conditions and/or nested
|
web/src/customer-grid/useGridColumns.ts
CHANGED
|
@@ -168,7 +168,38 @@ export function columnTones(
|
|
| 168 |
* languages).
|
| 169 |
*/
|
| 170 |
function isDefaultVisible(field: Field): boolean {
|
| 171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
}
|
| 173 |
|
| 174 |
export function defaultViewConfig(fields: Field[]): ViewConfig {
|
|
|
|
| 168 |
* languages).
|
| 169 |
*/
|
| 170 |
function isDefaultVisible(field: Field): boolean {
|
| 171 |
+
if (field.default === false) return false;
|
| 172 |
+
/**
|
| 173 |
+
* ββ OWNER, 2026-08-23 β A NEW VIEW SHOWS THE DATABASE'S OWN COLUMNS AND NOTHING ELSE.
|
| 174 |
+
*
|
| 175 |
+
* Owner: *"when any new View is created only shareable pre-set data should show. Shared to me
|
| 176 |
+
* or Shared to everyone should be auto hidden."*
|
| 177 |
+
*
|
| 178 |
+
* β `custom || shared` IS THE WHOLE PREDICATE, and it is chosen because it is exactly the
|
| 179 |
+
* membership test `FieldsHidePanel` already uses to draw its two SHARED sections:
|
| 180 |
+
* "Shared with me" (field.custom || field.shared) && fieldEditMode === "users"
|
| 181 |
+
* "Shared with everyone" (field.custom || field.shared) && fieldEditMode === "collaborative"
|
| 182 |
+
* Both sections are subsets of `custom || shared`, so hiding on that flag hides both by
|
| 183 |
+
* construction rather than by keeping a second list of section names in step with the panel.
|
| 184 |
+
*
|
| 185 |
+
* β IT ALSO HIDES THE UNTITLED SECTION'S CREATED COLUMNS, and that is deliberate rather than
|
| 186 |
+
* over-reach. A route order carries `shared: true` with `edit: personal`, so it is filed under
|
| 187 |
+
* no heading at all β and 52 of them landed on the customer grid the same day this was asked
|
| 188 |
+
* for. The owner's first sentence is the rule ("ONLY pre-set data shows"); the second names the
|
| 189 |
+
* two headings, it does not bound the set.
|
| 190 |
+
*
|
| 191 |
+
* β MEASURED ON THE LIVE CUSTOMER GRID before it was written: of 105 fields, 77 opened SHOWN.
|
| 192 |
+
* 52 route columns, 14 collaborative `custom_*`, 3 `measure_*`, one legacy route and 7 plain
|
| 193 |
+
* Odoo columns. After this, the 7 remain β which is precisely what
|
| 194 |
+
* `aios_grid_fields.json` declares as `default: true`, i.e. the contract's own answer before
|
| 195 |
+
* anybody's columns piled on top of it.
|
| 196 |
+
*
|
| 197 |
+
* ββ A STORED VIEW IS UNTOUCHED. `normalizeConfig` spreads the saved `config` OVER this
|
| 198 |
+
* base, so a view that already recorded its own `visible` keeps it. What moves is a view born
|
| 199 |
+
* without one: the "All records" system view, a new view, a cohort view.
|
| 200 |
+
*/
|
| 201 |
+
if (field.custom === true || field.shared === true) return false;
|
| 202 |
+
return true;
|
| 203 |
}
|
| 204 |
|
| 205 |
export function defaultViewConfig(fields: Field[]): ViewConfig {
|