Skip to content

feat(reports): leftover observed on pair segments (v2.35.0) - #809

Closed
seonghobae wants to merge 3 commits into
feat/leftover-map-segment-cross-share-v2320from
feat/leftover-map-segment-observed-v2350
Closed

feat(reports): leftover observed on pair segments (v2.35.0)#809
seonghobae wants to merge 3 commits into
feat/leftover-map-segment-cross-share-v2320from
feat/leftover-map-segment-observed-v2350

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

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 b334b00eec9dc1196a6bf8a7e33a35e44a6b6c9d is an immutable ancestor of #811 exact head e626a1d0770208d6f821e06542091aa2ead87f25.

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

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

coderabbitai Bot commented Aug 30, 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: 39db1a45-6f9d-493a-81e7-022f41c8696e

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.

@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 on lines +405 to +414
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),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

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

Comment on lines +18 to +23
export function formatLeftoverMapObserved(value: number | null | undefined): string | null {
if (value == null || !Number.isFinite(value)) {
return null;
}
return `Y ${value.toFixed(2)}`;
}

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: Observed values remain authoritative

formatLeftoverMapObserved preserves finite zero and negative values. It never derives Y from residuals, expectations, or coordinates.

Devin Review

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

Comment on lines 359 to +360
const residualLabel = formatLeftoverMapResidual(pair.leftover_residual);
const observedLabel = formatLeftoverMapObserved(pair.observed_response);

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: Missing observations preserve other labels

observedLabel is independent of every existing label. Missing Y suppresses only its caption, leaving all other finite measurements visible.

Devin Review

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

Copy link
Copy Markdown
Contributor Author

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.

@seonghobae
seonghobae changed the base branch from feat/leftover-map-segment-residual-v2340 to feat/leftover-map-segment-cross-share-v2320 September 5, 2026 06:58
@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