feat: compound-FK bus routing + complete V1 relationship visualization (ADR-0044)
Completes requirement V1. A compound (multi-column) FK now routes a bus connector — each paired endpoint's stub merges into a shared vertical channel that splits to the other side — plus an explicit "(a, b) ▶ P.(x, y)" pairing line; the bus generalises the single-column jog (reproducing it exactly, so prior snapshots are unchanged). Self-referential FKs render as two same-named boxes. - output_render.rs: gutter_seg routes all endpoint pairs via a junction() bus; pairing line for compound FKs; compound, self-ref, and compound-from-data (build_diagram_table glue) tests + snapshots - compound_fk.rs: worker test that show_relationship carries both paired column lists into the diagram payload - db.rs: document do_show_one's now-app-superseded relationship prose branch (retained as a worker-API/text fallback; could back a future non-visual display option, cf. ADR-0044 OOS-7) Second /runda pass over the implementation: confirmed ADR-compliance, UTF-8/byte-range safety, and edge-case routing. The ADR §3 last-resort helper line was considered and rejected (vertical fallback + ratatui truncation cover all realistic cases). ADR-0044 marked implemented; requirements.md V1 -> [x]. Full suite 2207 pass / 0 fail / 1 ignored; clippy nursery clean.
This commit is contained in:
+15
-11
@@ -423,20 +423,24 @@ since ADR-0027.)
|
||||
|
||||
## Visualizations
|
||||
|
||||
- [/] **V1** Single-element views render in the output pane: a
|
||||
- [x] **V1** Single-element views render in the output pane: a
|
||||
selected table as its structure (columns, types, keys,
|
||||
constraints); a selected relationship as two tables joined by
|
||||
a line.
|
||||
*(Partial, verified 2026-06-07: the **table-structure** half is
|
||||
done — `output_render.rs:82-180` renders columns / types /
|
||||
constraints / indexes in a box-drawing table, with relationship
|
||||
metadata as `References:` / `Referenced by:` prose
|
||||
(`A.col → B.col`). The **relationship-as-line-art** half — two
|
||||
tables drawn side by side with a connecting line — is **not
|
||||
implemented** (deferred per `output_render.rs` §5 OOS-1, ADR
|
||||
pending). This is the relationship-visualisation piece that has
|
||||
been repeatedly pushed away; it is the substantive open part of
|
||||
V1. Selection-nav and the broader journal direction live in V4.)*
|
||||
*(Done 2026-06-10 — **ADR-0044**. The table-structure half shipped
|
||||
earlier; the **relationship-as-line-art** half (ADR-0016 OOS-1) now
|
||||
renders as **Style-A two-table connector diagrams** wherever a
|
||||
relationship is the subject: `show relationship <name>` (full
|
||||
structure boxes), `show table <T>` and `add`/`drop relationship`
|
||||
echoes (focal box + compact stacked diagrams). Child-left /
|
||||
parent-right, `n…1` cardinality, referential actions, bold title
|
||||
rows; rendered App-side and **width-aware** (side-by-side ↔ vertical
|
||||
fallback). **Compound** FKs route a shared bus + an explicit
|
||||
`(a, b) ▶ P.(x, y)` pairing line; **self-referential** FKs draw two
|
||||
same-named boxes. Incidental DDL echoes keep the prose form (the
|
||||
"relationship-relevant" reach). The §3 last-resort helper line was
|
||||
considered and rejected. Two `/runda` passes (design + implementation).
|
||||
Selection-nav and the broader journal direction remain in V4.)*
|
||||
- [/] **V2** SQL query results render as a dynamic table view in
|
||||
the output pane, with multiple result tabs supported.
|
||||
*(Partial, verified 2026-06-07: the **table view** is done —
|
||||
|
||||
Reference in New Issue
Block a user