feat(reports): leftover observed on pair segments (v2.35.0) - #809
feat(reports): leftover observed on pair segments (v2.35.0)#809seonghobae wants to merge 3 commits into
Conversation
….33.0) Caption leftover-map graphic-display pair segments with persisted leftover-map unexplained leftover U = R − R̂ (ADR 0276). After make seed, closest and farthest leftover pairs sit above the member list with the Gabriel biplot of already-named coordinates, leftover-map axis share when finite, axis ticks that match ξ (x, y) ζ (x, y) on the pair row, pair segments that match d on the pair row, pair segments that match R̂ on the pair row, pair segments that match R̂²/R² on the pair row, pair segments that match U²/R² on the pair row, pair segments that match 2R̂U/R² on the pair row, and pair segments that match U on the pair row; click a post marker or a pair button opens that post. A missing or non-finite U omits that unexplained leftover caption. A finite negative leftover is shown; do not clamp to nonnegative. Do not invent U from R and R̂ or from plotted coordinates. Never invent a leftover score or a theta. No new columns.
Caption leftover-map graphic-display pair segments with persisted leftover residual R so U + R̂ = R is graphic-auditable. UI-only; no new columns. Do not invent R from Y and E, from U and R̂, or from plotted coordinates.
Caption leftover-map graphic-display pair segments with persisted leftover observed Y so Y − E = R is graphic-auditable. UI-only; no new columns. Do not invent Y from R and E or from plotted coordinates.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| const observedY = leftoverMapStackedCaptionY( | ||
| labelPosition.labelY, | ||
| (distanceLabel !== null ? 1 : 0) + | ||
| (reconstructionLabel !== null ? 1 : 0) + | ||
| (explainedShareLabel !== null ? 1 : 0) + | ||
| (unexplainedShareLabel !== null ? 1 : 0) + | ||
| (crossShareLabel !== null ? 1 : 0) + | ||
| (unexplainedLeftoverLabel !== null ? 1 : 0) + | ||
| (residualLabel !== null ? 1 : 0), | ||
| ); |
There was a problem hiding this comment.
🟡 Observed captions can be clipped
Fully populated low segments place observedY beyond the fixed SVG height. The observed value disappears despite valid persisted data.
Prompt for agents
The new observed caption is appended as an eighth stacked segment label in frontend/src/leftoverMapPlotLayout.ts, but layoutLeftoverMapPlot still uses a fixed 320-pixel height and computes plot scaling before accounting for caption extents. For segments whose midpoint is near the bottom, observedY can exceed the SVG viewBox even when the prior labels remain visible. Adjust the layout so all finite caption stacks fit inside the viewBox, for example by reserving dynamic vertical space or choosing the stack direction based on available space. Add a boundary test where all eight captions are present and the segment midpoint is low enough to exercise the bottom edge.
Was this helpful? React with 👍 or 👎 to provide feedback.
| export function formatLeftoverMapObserved(value: number | null | undefined): string | null { | ||
| if (value == null || !Number.isFinite(value)) { | ||
| return null; | ||
| } | ||
| return `Y ${value.toFixed(2)}`; | ||
| } |
| const residualLabel = formatLeftoverMapResidual(pair.leftover_residual); | ||
| const observedLabel = formatLeftoverMapObserved(pair.observed_response); |
|
Cycle write probe 2026-08-30T07:09Z: leftover observed on pair segments (v2.35.0) remains stacked on #806. Independent APPROVE required. Do not self-approve. Do not squash-merge onto the unprotected leftover base. |
Superseded by verified full carryover in #811
This PR is closed without merge only because every valid delta is preserved in open successor #811. Exact head
b334b00eec9dc1196a6bf8a7e33a35e44a6b6c9dis an immutable ancestor of #811 exact heade626a1d0770208d6f821e06542091aa2ead87f25.#811 directly targets #804 exact base
c513002bea9e0ee3e6ccd0931c5256e52dbbd878; fresh compare is ahead by 5 / behind by 0. Fresh compare from this head to #811 is ahead by 2 / behind by 0 with this head as the merge base. The successor therefore carries this PR's observed-value implementation and all earlier unexplained/residual commits, ADRs, changelog/docs, i18n/layout/component code and tests/fixtures, plus later expected/rank deltas.Current-head review
5120237656on #811 records the consolidated ancestry. No predecessor check/review evidence transfers, and no force-push, squash, destructive rebase, gate weakening, or source deletion was used.