feat: land leftover pair clicks on the named Post quality criterion (v2.12.8) - #485
feat: land leftover pair clicks on the named Post quality criterion (v2.12.8)#485seonghobae wants to merge 9 commits into
Conversation
…v2.12.8) Clicking a leftover closest or farthest pair now opens that post with the leftover criterion current in Post quality (IRT). Home-list and report-member opens do not carry leftover focus (ADR 0125).
|
Warning Review limit reachedNext included review available in 54 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthrough잔여 closest/farthest pair를 선택하면 게시물이 Post quality의 관련 기준과 함께 열립니다. 해당 기준 행은 Changes잔여 기준 평가 랜딩
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🔵 Low · up to Leftover-pair buttons may omit the instruction and distance that screen-reader users need to understand the next step in Post quality. The change is otherwise mergeable, with explicit owner follow-up needed for this bounded accessibility issue. Sequence Diagram(s)sequenceDiagram
participant ReportLeftoverPair
participant App
participant PostDetailPopup
participant EvaluationPanel
ReportLeftoverPair->>App: leftover pair 게시물과 기준 정보 전달
App->>PostDetailPopup: 선택된 게시물과 leftoverFocus 전달
PostDetailPopup->>EvaluationPanel: closest/farthest 및 criterion_code 전달
EvaluationPanel->>EvaluationPanel: Post quality 제목으로 포커스 및 스크롤
EvaluationPanel->>EvaluationPanel: 관련 기준 행을 aria-current로 표시
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
The closest leftover path already marked sales-lead current. Also assert the farthest pair names the leftover criterion next action after open.
|
Pushed 15f287b with farthest leftover landing coverage. Independent exact-head APPROVE is still required. I will not self-approve or squash-merge. |
|
Strix retry attempt 2 disposition (run 32638186855, job 97197556685): provider/infrastructure failure, not an authoritative source finding. The primary NVIDIA request returned HTTP 429; the NVIDIA fallback emitted failure-signal output without a structured report; |
- ADR 0125 was independently claimed by 4+ in-flight branches (including docs/adr/0125-customer-master-scope-facets.md); scanned main plus all 52 open PRs and renumbered this ADR to the free number 0158, updating every cross-reference (AGENTS.md, ARCHITECTURE.md, CHANGELOG.md, CHANGELOG.d, and ADR 0049). - Reworded "the buyer" to "the reader" in the new ADR's Context section per ADR 0119 (Retire Buyer terminology), which forbids the term in new non-historical docs.
) * feat: name leftover residual on period-report pair rows (v2.12.12) Period leftover pairs already persisted R = Y − E[Y|θ, item] beside leftover-map distance. The pair button only showed d, so a large leftover response looked the same as a merely distant map pair. Show signed residual R with the next action to read it after IRT main effects, then open that post. Independent of leftover-map persistence (#481) and leftover-criterion landing (#485). Jeon et al. (2021, eq. 3); Gabriel (1971). ADR 0162. * fix(frontend): repair the inherited login/admin-panel build break Two TypeScript build errors on main (blocking every open PR's "Frontend lint, test, build" check, including this repo's own review bot's ability to approve them): - App.tsx imported rememberOidcReturnUrl/returnUrlFromLocation from oidcReturnUrl.ts but never called them -- the login button built its own unsanitized returnUrl inline instead of using the safe helper (oidcReturnUrl.ts's isSafeReturnUrl guard against an open-redirect- shaped value) or persisting it as the sessionStorage/localStorage fallback restoreOidcReturnUrl (already wired up on the callback side in main.tsx) reads when the OIDC state round-trip drops it. - The unauthenticated login screen unconditionally rendered <AdminPanel accessToken={accessToken} /> when destination === "admin" -- accessToken is string | undefined here (always undefined while unauthenticated), a real type error, and the render was unreachable through normal navigation (destination only changes via the authenticated nav) -- dead code, removed. uv run --frozen python -m pytest -q: 753 passed, 17 skipped. pnpm run test: 140 passed. pnpm run lint / build: clean. * docs: align residual architecture contract
* feat: persist leftover observed Y and expected E (v2.12.20) After seed, leftover closest/farthest pairs sit above the member list with observed Y and expected E[Y|θ, item] next to leftover-map distance d. Click opens that post. Residual stays R = Y − E (Jeon et al., 2021 eq. 3; Gabriel 1971; ADR 0170). Never invent a leftover score or theta. Independent of leftover persist-map (#481), criterion landing (#485), complete-case coverage (#518), leftover-map axis share (#519), comparison-strip leftover pairs (#521), and two-axis distance (#522). Issues #79 and #87 stay open. * Repair inherited login build boundary * Move leftover evidence contract to ADR 0177 * fix: show leftover Y and E after stacking onto the workspace branch Merge #490 without force-push. Keep ADR 0049 next-action copy and name observed Y and expected E on leftover pair buttons. Replay migration 0177 on existing volumes. * fix(leftover-observed-expected): wire missing migration and translations Two genuine gaps in this PR's own diff, unrelated to any merge conflict: 1. backend/tests/test_api.py and tests/test_schema.py never applied migration 0177_report_leftover_observed_expected.sql in their test DB fixtures, even though report_ingestion.py already inserts into the observed_response/expected_response columns it adds. Every period-report test that touches leftover pairs failed with UndefinedColumnError. 2. frontend/src/i18n.ts never got the ko/zh/ja/vi translations for the two leftover-map-rank action strings that frontend/src/leftoverMapRank.ts (added downstream, in the PR that bases on this one) references — t()/tf() fall back to the raw English key for every locale, failing the i18n test suite in the whole downstream chain. Verified: 1035 Python tests pass, 362 frontend tests pass, build/lint clean.
* feat: persist leftover observed Y and expected E (v2.12.20) After seed, leftover closest/farthest pairs sit above the member list with observed Y and expected E[Y|θ, item] next to leftover-map distance d. Click opens that post. Residual stays R = Y − E (Jeon et al., 2021 eq. 3; Gabriel 1971; ADR 0170). Never invent a leftover score or theta. Independent of leftover persist-map (#481), criterion landing (#485), complete-case coverage (#518), leftover-map axis share (#519), comparison-strip leftover pairs (#521), and two-axis distance (#522). Issues #79 and #87 stay open. * Repair inherited login build boundary * Move leftover evidence contract to ADR 0177 * feat: name leftover-map rank on leftover pairs (v2.12.21) After seed, leftover closest/farthest pairs sit above the member list with leftover-map rank next to leftover-map distance d. Click opens that post. Rank is the count of Gabriel singular values above the floor (Jeon et al., 2021 eq. 3; Gabriel 1971; ADR 0171). Rank 0 names no leftover structure. Never invent a leftover score or theta. Independent of leftover persist-map (#481), criterion landing (#485), complete-case coverage (#518), leftover-map axis share (#519), comparison-strip leftover pairs (#521), two-axis distance (#522), and observed Y / expected E (#527). Issues #79 and #87 stay open. * Move leftover-map rank contract to ADR 0172 ADR 0171 is already used by analysis-run status same clock (#524). Keep leftover-map rank independent: ADR 0172 and migration 0172. Shipped 0001 / 0012 stay untouched. * fix: restore frontend build on leftover-map PR Drop unused OIDC import and unauthenticated AdminPanel that fail tsc (TS6192 / TS2322). AdminPanel stays authenticated-only. * fix: show leftover Y and E after stacking onto the workspace branch Merge #490 without force-push. Keep ADR 0049 next-action copy and name observed Y and expected E on leftover pair buttons. Replay migration 0177 on existing volumes. * fix: keep leftover-map rank after stacking onto leftover Y/E Merge stacked #527 without force-push. Persist leftover_map_rank with observed Y and expected E, and name rank on leftover pair buttons.
) * feat: persist leftover observed Y and expected E (v2.12.20) After seed, leftover closest/farthest pairs sit above the member list with observed Y and expected E[Y|θ, item] next to leftover-map distance d. Click opens that post. Residual stays R = Y − E (Jeon et al., 2021 eq. 3; Gabriel 1971; ADR 0170). Never invent a leftover score or theta. Independent of leftover persist-map (#481), criterion landing (#485), complete-case coverage (#518), leftover-map axis share (#519), comparison-strip leftover pairs (#521), and two-axis distance (#522). Issues #79 and #87 stay open. * Repair inherited login build boundary * Move leftover evidence contract to ADR 0177 * feat: name leftover-map rank on leftover pairs (v2.12.21) After seed, leftover closest/farthest pairs sit above the member list with leftover-map rank next to leftover-map distance d. Click opens that post. Rank is the count of Gabriel singular values above the floor (Jeon et al., 2021 eq. 3; Gabriel 1971; ADR 0171). Rank 0 names no leftover structure. Never invent a leftover score or theta. Independent of leftover persist-map (#481), criterion landing (#485), complete-case coverage (#518), leftover-map axis share (#519), comparison-strip leftover pairs (#521), two-axis distance (#522), and observed Y / expected E (#527). Issues #79 and #87 stay open. * Move leftover-map rank contract to ADR 0172 ADR 0171 is already used by analysis-run status same clock (#524). Keep leftover-map rank independent: ADR 0172 and migration 0172. Shipped 0001 / 0012 stay untouched. * feat: name leftover residual on period-report pair rows (v2.12.22) After seed, leftover closest/farthest pairs sit above the member list with signed leftover residual R next to leftover-map distance d. Click opens that post. Residual is R = Y − E[Y|θ, item] (Jeon et al., 2021 eq. 3; Gabriel 1971; ADR 0178). A non-finite residual is an em dash. Never invent a leftover score or theta. Independent of leftover persist-map (#481), criterion landing (#485), complete-case coverage (#518), leftover-map axis share (#519), comparison-strip leftover pairs (#521), two-axis distance (#522), observed Y / expected E (#527), and leftover-map rank (#529). Issues #79 and #87 stay open. * fix: restore frontend build on leftover residual disclosure Drop unused OIDC import and unauthenticated AdminPanel that fail tsc (TS6192 / TS2322). Login matches the workspace branch: AdminPanel is authenticated-only. * fix: restore frontend build on leftover-map PR Drop unused OIDC import and unauthenticated AdminPanel that fail tsc (TS6192 / TS2322). AdminPanel stays authenticated-only. * fix: show leftover Y and E after stacking onto the workspace branch Merge #490 without force-push. Keep ADR 0049 next-action copy and name observed Y and expected E on leftover pair buttons. Replay migration 0177 on existing volumes. * fix: keep leftover-map rank after stacking onto leftover Y/E Merge stacked #527 without force-push. Persist leftover_map_rank with observed Y and expected E, and name rank on leftover pair buttons.
# Conflicts: # AGENTS.md # ARCHITECTURE.md # CHANGELOG.md # docs/adr/0049-leftover-pair-report-ui.md # frontend/package.json # frontend/src/App.test.tsx # frontend/src/App.tsx # pyproject.toml
…rst match LeftoverPairList forwarded only post_id and App re-resolved it with leftover_pairs.find(p => p.post_id === postId). When one post is both a closest pair on one criterion and a farthest pair on another, the farthest button resolved to the first match and opened Post quality with the wrong criterion and wrong closest/farthest copy. Pass the full LeftoverPair through onSelectPost and build the focus directly; the component test now asserts the clicked pair identity reaches the callback (devin bug thread PRRT_kwDOT22WIM6bldKZ).
| "Open this post so the leftover criterion is current in Post quality.": | ||
| "이 글을 열어 잔여 기준이 게시글 품질에서 현재 항목이 되게 하세요.", |
There was a problem hiding this comment.
📝 Info: ADR 0158 button next-action string added but never rendered
ADR 0158 (added here) says the leftover-pair button next action is "Open this post so the leftover criterion is current in Post quality." That exact string was added to the ko/zh/ja/vi dictionaries in i18n.ts but no component renders it. LeftoverPairList keeps the older rank/Y/E next action, which the tests assert. The ADR copy is unimplemented and the new translations are dead.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
📝 Info: ADR 0049 Amended-by header omits 0158
The PR rewrites the Decision text of 0049-leftover-pair-report-ui.md to match ADR 0158, but the "Amended by" header still lists only 0162/0163/0164. Adding 0158 there would keep the amendment trail complete.
(Refers to this code)
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Clicking a leftover closest or farthest pair already opened the post. The leftover residual is a post–criterion fact (Jeon et al., 2021, eq. 3; Gabriel 1971 biplot). This increment lands Post quality (IRT) on the named leftover criterion.
aria-current, and the leftover-criterion next action names the closest/farthest score to read.ADR 0125. Version 2.12.8.
Test plan
pnpm test -- src/App.test.tsx -t leftover|calibrated period-report mean|opens Event Lineage, KeymanDo not squash-merge without independent APPROVE + exact-head required success.
Summary by CodeRabbit
새로운 기능
문서
개선