Skip to content

feat(reports): leftover residual on pair segments (v2.34.0) - #806

Closed
seonghobae wants to merge 2 commits into
feat/leftover-map-segment-cross-share-v2320from
feat/leftover-map-segment-residual-v2340
Closed

feat(reports): leftover residual on pair segments (v2.34.0)#806
seonghobae wants to merge 2 commits into
feat/leftover-map-segment-cross-share-v2320from
feat/leftover-map-segment-residual-v2340

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Superseded by verified full carryover in #811

This PR is closed without merge only under the verified-successor exception. Exact head 33f6c3dda7f80b1bcf7b244d5e6d65068d582ba7 is an immutable ancestor of open successor #811 exact head e626a1d0770208d6f821e06542091aa2ead87f25.

#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 5120237656 on #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.

….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.
@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6312fd55-9df1-470f-accf-0e3018c34732

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

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.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

Devin Review

Comment thread frontend/package.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Runtime verification remains unavailable

Corepack rejected the pinned pnpm signature, so the focused frontend tests could not run locally. CI must provide the executable verification.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +387 to +395
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),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +16 to +20
export function formatLeftoverMapResidual(value: number | null | undefined): string | null {
if (value == null || !Number.isFinite(value)) {
return null;
}
return `R ${formatLeftoverResidual(value)}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Persisted residual boundary remains intact

formatLeftoverMapResidual formats only the supplied finite residual. Missing values stay omitted, and no neighboring measurements reconstruct them.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor Author

Independent APPROVE is still required on exact head 33f6c3dd. Devin COMMENT and Copilot review are not independent APPROVE. Do not self-approve. Do not squash-merge onto the unprotected leftover base. v2.35 leftover observed Y on pair segments stacks onto this head on feat/leftover-map-segment-observed-v2350 and will open as a follow-up PR; it does not mix into this stack until independent review of this exact head.

@seonghobae
seonghobae changed the base branch from feat/leftover-map-segment-unexplained-leftover-v2330 to feat/leftover-map-segment-cross-share-v2320 September 5, 2026 06:56
@seonghobae seonghobae closed this Sep 5, 2026
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