-
Notifications
You must be signed in to change notification settings - Fork 1
feat(reports): preserve grouping comparison reconstruction for serialized successor #826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
seonghobae
wants to merge
3
commits into
feat/leftover-map-compare-incomplete-item-v2490
Choose a base branch
from
feat/leftover-map-compare-reconstruction-v2500
base: feat/leftover-map-compare-incomplete-item-v2490
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ## 2.52.0 — Grouping comparison leftover-map reconstruction | ||
|
|
||
| - Show persisted leftover-map reconstruction `R̂` on grouping-comparison pair buttons (ADR 0295). | ||
| - Include the admitted reconstruction label/value in the button accessible name; keep the visible badge `aria-hidden` so it is not double-announced. | ||
| - Missing or non-finite values omit only the reconstruction; do not derive `R̂` from distance, coordinates, residuals, rank, coverage, or any other proxy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # ADR 0295 — Grouping comparison leftover-map reconstruction | ||
|
|
||
| **Decision status:** Proposed | ||
|
|
||
| ## Problem | ||
| Grouping-comparison pair rows carry persisted `leftover_map_reconstruction`, but the serialized current stack does not expose it. The historical implementation placed a reconstruction badge inside a button that already had an explicit `aria-label`; descendant text therefore did not reliably contribute to the button accessible name. | ||
|
|
||
| ## Decision | ||
| Format only persisted `leftover_map_reconstruction` through `formatLeftoverMapReconstruction`. Render the visible `R̂` badge, mark that duplicate badge `aria-hidden`, and include the localized comparison-reconstruction label plus formatted value in the pair button accessible name. Missing or non-finite `R̂` omits only this suffix. Never reconstruct `R̂` from distance, coordinates, residuals, unexplained leftover, rank, coverage counts, or any visible-subset proxy. | ||
|
|
||
| This is LineageWeave read-model/UI composition only; fast-mlsirm remains the psychometric owner. ADR status remains Proposed while Draft. Acceptance requires current-head hosted tests, keyboard/screen-reader/browser evidence, canonical eight-locale translation-ledger convergence, independent approval, and normal protected-branch merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -143,6 +143,10 @@ import { | |
| LEFTOVER_MAP_AXIS_BADGE_SHARE, | ||
| LEFTOVER_MAP_AXIS_BADGE_SINGULAR, | ||
| } from "./leftoverMapAxisBadge"; | ||
| import { | ||
| formatLeftoverMapReconstruction, | ||
| LEFTOVER_MAP_COMPARE_RECONSTRUCTION_LABEL, | ||
| } from "./leftoverMapReconstruction"; | ||
| import "./App.css"; | ||
|
|
||
| const AdminPanel = lazy(() => import("./components/AdminPanel").then((module) => ({ default: module.AdminPanel }))); | ||
|
|
@@ -4066,14 +4070,22 @@ function ReportsPanel({ | |
| ? "Open this post to read the criterion it sat farthest from after main effects." | ||
| : "Open this post to read the criterion it sat closest to after main effects."; | ||
| const criterion = criterionShortLabel(pair.criterion_code); | ||
| const reconstruction = formatLeftoverMapReconstruction( | ||
| pair.leftover_map_reconstruction, | ||
| ); | ||
| const pairAccessibleName = `Open leftover ${pair.pair_kind} pair from comparison: ${pair.post_title} · ${criterion}${ | ||
| reconstruction | ||
| ? ` · ${t(LEFTOVER_MAP_COMPARE_RECONSTRUCTION_LABEL)} ${reconstruction}` | ||
| : "" | ||
| }`; | ||
| return ( | ||
| <li | ||
| key={`${row.grouping_kind}:${row.grouping_key}:${pair.pair_kind}:${pair.post_id}:${pair.criterion_code}`} | ||
| className="ticket-list-item" | ||
| > | ||
| <button | ||
| className="post-list-item" | ||
| aria-label={`Open leftover ${pair.pair_kind} pair from comparison: ${pair.post_title} · ${criterion}`} | ||
| aria-label={pairAccessibleName} | ||
| onClick={() => | ||
| // Same promise, same landing: the badge tells the | ||
| // reader the criterion will be current in Post | ||
|
|
@@ -4092,6 +4104,11 @@ function ReportsPanel({ | |
| </span> | ||
| <span className="post-badge">{nextAction}</span> | ||
| <span className="post-badge">d {pair.leftover_distance.toFixed(2)}</span> | ||
| {reconstruction ? ( | ||
| <span className="post-badge" aria-hidden="true"> | ||
| {reconstruction} | ||
| </span> | ||
| ) : null} | ||
|
Comment on lines
+4107
to
+4111
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| </button> | ||
| </li> | ||
| ); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,4 +130,4 @@ | |
| "serialize_lineage_analysis_result", | ||
| ] | ||
|
|
||
| __version__ = "2.51.0" | ||
| __version__ = "2.52.0" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| from pathlib import Path | ||
|
|
||
| ROOT = Path(__file__).resolve().parents[1] | ||
|
|
||
|
|
||
| def test_reconstruction_comparison_uses_distinct_proposed_adr_0295() -> None: | ||
| assert (ROOT / "docs/adr/0294-leftover-map-compare-incomplete-item.md").exists() | ||
| path = ROOT / "docs/adr/0295-leftover-map-compare-reconstruction.md" | ||
| assert path.exists() | ||
| text = path.read_text(encoding="utf-8") | ||
| assert text.startswith("# ADR 0295 —") | ||
| assert "**Decision status:** Proposed" in text | ||
| assert "**Decision status:** Accepted" not in text | ||
| assert "accessible name" in text | ||
| assert "fast-mlsirm" in text |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Info: Comparison payload already carries reconstruction
The comparison payload already returns persisted reconstruction after authorization filtering. Missing and non-finite values remain omitted by the shared formatter.
Was this helpful? React with 👍 or 👎 to provide feedback.