diff --git a/web-reality-gaps.md b/web-reality-gaps.md new file mode 100644 index 00000000..5da35dab --- /dev/null +++ b/web-reality-gaps.md @@ -0,0 +1,240 @@ +# Where the web UI disagreed with the server + +Thirteen places where the Add-table builder and the append-columns panel offered, +promised or accepted something the backend does not do. All thirteen are fixed in +the `web` crate; the server is untouched. Ordered by severity. + +Severity is what the gap costs the user: + +- **Blocking** — the UI leads you to a definition the server refuses outright. +- **Wrong** — the UI states something untrue about the table you are creating. +- **Missing** — a real backend capability the UI gives you no way to reach. +- **Misleading** — accurate enough to act on, wrong enough to confuse. + +`cargo test -p web`: **158 passed**, up from 134. Clippy clean for every file +touched. + +--- + +## 1. Indexing a FKlink — blocking + +**Was:** the column panel offered `Indexing: yes/no` for a link like any other +column, and the column list gave it an index toggle. + +**Reality:** a link is a foreign key, and the server builds an index for every +one of them as it creates the table +(`server/src/table_definition/managed_table.rs:361`). Naming a link in `indexes` +is not redundant — it is refused: + +``` +Link 'billing_customer' is indexed automatically +``` + +`post_table_definition.rs:514`, and the same rule on the append path at +`add_table_columns.rs:322`. So the whole table failed to create, after the +Create button, for a checkbox the UI itself offered. + +**Now:** `ColumnDraft::is_indexable` is false for a link, the Indexing field is +replaced by *"Indexed automatically — a link is a foreign key, and the server +indexes every one of them"*, the column list reports `indexed automatically` +with no toggle, `selected_index_names` can never name a link, and a rebuilt or +tampered post is refused here with the server's own reason instead of being +forwarded. Both screens. + +## 2. Global tables and the columns that post to a profile's books — blocking + +**Was:** the shared scope offered ACCOUNTING, ACCOUNTING_TRANSFER and the +quantity-ledger switch exactly as a profile scope does. + +**Reality:** `post_table_definition.rs:280` — *"Global tables cannot use +accounting or quantity-ledger columns"*. A shared table belongs to every profile +at once, so there is no one set of books for it to post to. + +**Now:** the two types are not offered in the shared scope, the quantity-ledger +field is not rendered there, and both are refused with the reason. Switching an +existing draft to the shared scope reports it *at the switch* rather than at +save — the picker going quiet is not an explanation on its own. + +## 3. Table names could be 63 characters — blocking + +**Was:** `validate_identifier(…, "Table name")`, the plain 63-character +identifier rule. + +**Reality:** a table name is a prefix that longer identifiers are built from — +`idx_