Skip to content

feat(reports): leftover-map singular values on grouping comparison graphic (v2.78.0) - #861

Draft
seonghobae wants to merge 6 commits into
feat/leftover-map-compare-plot-ticks-v2770from
feat/leftover-map-compare-plot-singular-v2780
Draft

feat(reports): leftover-map singular values on grouping comparison graphic (v2.78.0)#861
seonghobae wants to merge 6 commits into
feat/leftover-map-compare-plot-ticks-v2770from
feat/leftover-map-compare-plot-singular-v2780

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Current exact authority

Invariant

Comparison axes read persisted leftover_singular_value independently of axis share, preserve finite σ=0, and omit missing/non-finite/negative σ. Singular-only, share-only, combined, and empty states remain distinct; no value is inferred or clamped from the other.

#859 remains executable RED on stale comparison-component distance assertions, so no ancestor validation receipt transfers. Keep Draft until inherited/local REDs are causally GREEN plus fresh repository/security/browser/a11y/performance evidence and independent approval.

…aphic (v2.78.0)

Caption persisted leftover-map singular values σ_k on the grouping comparison leftover-map graphic from already-named leftover-map axes (ADR 0321). Share and singular value omit independently. Rank-0 unused axes still name σ 0.00. Do not invent σ from leftover-map axis share. Synthetic fixtures only.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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

Stacked on #860 @ 40fa5bd. Head 3aac452 (v2.78.0 / ADR 0321). Independent APPROVE required on this exact head before squash-merge. Copilot/Devin COMMENT is not independent APPROVE. Do not self-approve. Do not squash-merge onto the unprotected leftover base. Issues #79 and #87 stay open. Synthetic fixtures only.

@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 +105 to +109
return tf(LEFTOVER_MAP_COMPARE_PLOT_AXIS_SINGULAR_SHARE, {
axis: axisIndex,
value: singular,
share: percent,
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Second-axis singular value is clipped

When axis 2 has a singular value, leftoverMapPlotAxisText expands its fixed-position label beyond the 480-pixel SVG. The value is visibly clipped.

Prompt for agents
The comparison variant now renders a substantially longer axis label, but axis 2 remains positioned at layout.originX + 8 with the default start anchor in frontend/src/components/LeftoverMapPlot.tsx. In the fixed 480px SVG, the English singular-value label already extends beyond the right boundary; translations can be longer. Adjust the axis-label rendering so the full singular value and optional share remain visible for both axes and all supported locales. Consider separate visible SVG text and accessible naming, wrapping, repositioning, or a compact visual format, while preserving the ADR 0321 accessible-name contract and the independent omission behavior.
Devin Review

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

Comment on lines +21 to +34
export function leftoverSingularForAxis(
axes: ReadonlyArray<LeftoverMapPlotAxisSingular> | null | undefined,
axisIndex: number,
): number | null {
const axis = axes?.find((candidate) => candidate.axis_index === axisIndex);
if (
axis == null ||
axis.leftover_singular_value == null ||
!Number.isFinite(axis.leftover_singular_value) ||
axis.leftover_singular_value < 0
) {
return null;
}
return axis.leftover_singular_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 values remain authoritative

leftoverSingularForAxis accepts only the matching persisted, finite, non-negative value. Missing or invalid values omit independently from axis share.

Devin Review

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

Comment on lines 92 to 112
if (variant === "comparison") {
if (percent === null) {
const singular = formatLeftoverMapPlotAxisSingular(
leftoverSingularForAxis(leftoverMapAxes, axisIndex),
);
if (singular === null && percent === null) {
return t(axisIndex === 1 ? LEFTOVER_MAP_COMPARE_PLOT_AXIS_1 : LEFTOVER_MAP_COMPARE_PLOT_AXIS_2);
}
return tf(LEFTOVER_MAP_COMPARE_PLOT_AXIS_SHARE, { axis: axisIndex, share: percent });
if (singular === null) {
return tf(LEFTOVER_MAP_COMPARE_PLOT_AXIS_SHARE, { axis: axisIndex, share: percent });
}
if (percent === null) {
return tf(LEFTOVER_MAP_COMPARE_PLOT_AXIS_SINGULAR, { axis: axisIndex, value: singular });
}
return tf(LEFTOVER_MAP_COMPARE_PLOT_AXIS_SINGULAR_SHARE, {
axis: axisIndex,
value: singular,
share: percent,
});
}
if (percent === null) {
return t(axisIndex === 1 ? "leftover-map axis 1" : "leftover-map axis 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: Report labels remain isolated

The singular-value branch runs only for comparison graphics. Report graphics retain their existing share-only labels.

(Refers to this code)

Devin Review

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

Copy link
Copy Markdown
Contributor Author

Exact head 3aac452eef781f3c1a5da258cd1c0c548e4930e6 still lacks independent APPROVE. Copilot/Devin review is not independent approval. Leave this PR open. Do not squash-merge. Do not self-approve. Issues #79 and #87 stay open.

@opencode-agent

opencode-agent Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: 3aac452eef781f3c1a5da258cd1c0c548e4930e6

Adopt exact reconstructed #860 as the current tree while preserving historical #861 as first parent. Retain the v2.78 singular-value product delta as executable RED: comparison axes must name persisted finite non-negative σ values with distinct comparison copy, preserve σ=0, omit invalid σ independently of share, and never infer σ from axis share. Exact #860 is the second parent. No force update or destructive rebase.
seonghobae added a commit that referenced this pull request Sep 10, 2026
Adopt exact reconstructed #861 as the current tree while preserving historical #862 as first parent. Retain the v2.79 report-axis singular-value delta as executable RED: report badges must expose persisted finite non-negative σ independently of axis share, preserve σ=0, and never borrow comparison-graphic copy or infer σ from share. Exact #861 is the second parent. No force update or destructive rebase.
Adopt exact converged #860 head c7793c2 without force-updating or replaying stale historical source. Preserve the existing #861 reconstruction as first parent, retain its singular-value RED unchanged, and take the converged parent tree as the second parent.
seonghobae added a commit that referenced this pull request Sep 11, 2026
Adopt exact converged #861 head 597fa62 without force-updating or replaying stale historical source. Preserve the existing #862 reconstruction as first parent, retain its report-axis singular RED unchanged, and take the converged parent tree as the second parent.
Adopt exact converged #860 head 4692d63 without force-updating or replaying stale source. Preserve the existing #861 convergence as first parent, retain its singular-value RED unchanged, and take the updated parent tree as second parent.
seonghobae added a commit that referenced this pull request Sep 11, 2026
Adopt exact converged #861 head 36f5986 without force-updating or replaying stale source. Preserve the existing #862 convergence as first parent, retain its report-axis singular RED unchanged, and take the updated parent tree as second parent.
chore(stack): converge #861 onto repaired #860 head
seonghobae added a commit that referenced this pull request Sep 11, 2026
chore(stack): converge #862 onto repaired #861 head
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant