Skip to content

QT desk: the A -> B -> C approval (C10), multipliers, settings collapse - #135

Merged
dominickdupuy merged 7 commits into
mainfrom
qt/desk-pipeline
Oct 14, 2026
Merged

dominickdupuy merged 7 commits into
mainfrom
qt/desk-pipeline

Conversation

@dominickdupuy

Copy link
Copy Markdown
Member

Dom (2026-10-14): A (model) -> B (QT edits) -> Approve -> dynopt + risk -> C. C == B within limits: auto-approve. C != B: approve C knowingly, or ask the VP or President to approve B. Also: show the engine's multipliers; collapsible settings.

Needs AlgoGators/trade-ngin#208 (engine side of C10, desk.proto 1.5.0). Proto vendored from that branch's head; re-pinned to main after it merges.

Backend

  • POST /portfolio/desk/<id>/approve (ApproveDesk): approve_proposal writes the save and a publish row {flow: auto, after: <save>} in one transaction under the day lock, then RunDesk and Publish (with its audit_id). No risk gate before the pass; the engine decides.
  • POST .../publish {flow: accept_c, acknowledged}: _refuse_c_outside_limits (latest done save, current risk report, C not over a limit / not refused, fail closed). A plain publish keeps the C9 gate.
  • DecideOverride -> decide_override: an approval also inserts {flow: override_b, after: <decision>} requested by the QT who asked, then Publish.
  • desk_client maps multipliers.

Frontend

  • ApprovalPipeline: A -> B -> C -> Approved strip, and on a difference the B vs C table, an acknowledgement checkbox + Approve C, and Ask the VP or President to approve B (prefilled override form).
  • The top Approve approves B as it stands; the edit form has Approve and Check without approving.
  • RiskReport: multipliers table. SettingsEditor: Expand all / Collapse all, History (N) toggle, open state remembered per viewer (localStorage, guarded).

Tests: backend 584 incl. the real-DB integration suite; vitest 162; build.

…ttings collapse

Approve on B saves the edits and queues a publish that runs after the engine's pass
(POST /approve, one transaction). The engine auto-approves when its book C equals B
within the limits; otherwise the desk panel shows B against C and the QT approves C
(acknowledging the differences) or asks the VP or President to approve B, whose
approval books B and approves the day. The risk report lists the multipliers (m,
risk scale, configured IDM and FDM). Settings: expand/collapse all, folded history,
remembered per viewer. Vendors desk.proto 1.5.0.
Each limit is a card with its value against its max and a usage bar; the sentence moves
to the tooltip unless the limit bound or is over. The multipliers and margin readings
are one line of chips; the symbols the engine moved fold away unless a risk limit moved
one.
src/index.css is a fixed Tailwind 4.1.3 export holding only the classes used when it was
made; any other class (font-medium, pr-4, the desk's colours, grid columns, disabled:...)
silently did nothing, which crowded the QT desk. Tailwind's PostCSS plugin, pinned to the
same 4.1.3 (the Vite plugin does not support Vite 8), now generates the theme and every
utility the components use into the same cascade layers (src/tailwind.css).
Fixed column widths; a long running or pending value is cut with the whole of it in the
tooltip, so it no longer squeezes the names; names wrap at words; config comments (_note,
_description, ...) are left out: they are documentation, not settings.
@dominickdupuy
dominickdupuy merged commit 742dc03 into main Oct 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant