feat(reports): leftover residual on pair segments (v2.34.0) - #806
feat(reports): leftover residual on pair segments (v2.34.0)#806seonghobae wants to merge 2 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.
|
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 |
|
Leave open for independent review. Do not squash-merge onto the unprotected leftover base. Do not self-approve. Copilot review is not independent APPROVE. After independent review, retarget onto leftover-coordinates (#782) rather than squash-merging here. |
| const residualY = 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), | ||
| ); |
There was a problem hiding this comment.
🟡 Bottom segment residuals are clipped
When a segment lies near the plot bottom, residualY places its residual label beyond the fixed SVG height. The new caption disappears.
Prompt for agents
The new residual caption uses the seventh downward stack position from the segment midpoint, but the SVG has a fixed 320-pixel height and 40-pixel plot padding. For segments whose endpoints are near the lowest plotted axis value, residualY can exceed the view box and the finite residual caption is clipped. Update the segment-label layout in frontend/src/leftoverMapPlotLayout.ts to choose a stack direction or reserve sufficient bounds based on the complete caption stack. Add a test with a segment near the lower plot boundary that verifies every finite label, including residualLabel, remains inside the SVG view box.
Was this helpful? React with 👍 or 👎 to provide feedback.
| export function formatLeftoverMapResidual(value: number | null | undefined): string | null { | ||
| if (value == null || !Number.isFinite(value)) { | ||
| return null; | ||
| } | ||
| return `R ${formatLeftoverResidual(value)}`; |
|
Independent APPROVE is still required on exact head |
Superseded by verified full carryover in #811
This PR is closed without merge only under the verified-successor exception. Exact head
33f6c3dda7f80b1bcf7b244d5e6d65068d582ba7is an immutable ancestor of open successor #811 exact heade626a1d0770208d6f821e06542091aa2ead87f25.#811 now 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 3 / behind by 0 with this head as the merge base. Thus #811 preserves this PR's complete carried #805 unexplained-leftover delta plus this residual implementation, ADR/changelog/docs and executable UI/i18n/layout fixtures/tests, together with later observed/expected/rank deltas.Current-head review
5120237656on #811 records the consolidated ancestry. Historical checks/reviews from this PR do not transfer. No force-push, squash, destructive rebase, gate weakening, or source deletion was used.