Skip to content

feat: land leftover pair clicks on the named Post quality criterion (v2.12.8) - #485

Open
seonghobae wants to merge 9 commits into
mainfrom
feat/leftover-criterion-evaluation-landing-v2128
Open

feat: land leftover pair clicks on the named Post quality criterion (v2.12.8)#485
seonghobae wants to merge 9 commits into
mainfrom
feat/leftover-criterion-evaluation-landing-v2128

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

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.

ADR 0125. Version 2.12.8.

Test plan

  • pnpm test -- src/App.test.tsx -t leftover|calibrated period-report mean|opens Event Lineage, Keyman
  • Independent exact-head APPROVE (I will not self-approve)
  • Required Checks on this exact head

Do not squash-merge without independent APPROVE + exact-head required success.


Open in Devin Review

Summary by CodeRabbit

  • 새로운 기능

    • 남은 closest/farthest 항목을 선택하면 해당 게시물의 Post quality에서 관련 평가 기준으로 바로 이동합니다.
    • 선택된 기준이 강조 표시되고, 다음에 확인할 남은 점수가 안내됩니다.
    • 영어, 중국어, 일본어, 베트남어 안내 문구를 추가했습니다.
  • 문서

    • 관련 사용 동작과 릴리스 정보를 업데이트했습니다.
  • 개선

    • 로그인 후 원래 페이지로 돌아가는 동작을 보완했습니다.
    • 일반 게시물 및 보고서 항목 열기에는 남은 기준 강조가 적용되지 않습니다.

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

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 54 minutes.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5bc54d10-aa90-4db2-962b-50974c5ad7eb

📥 Commits

Reviewing files that changed from the base of the PR and between 216c960 and 37f200d.

📒 Files selected for processing (10)
  • AGENTS.md
  • ARCHITECTURE.md
  • CHANGELOG.md
  • docs/adr/0049-leftover-pair-report-ui.md
  • frontend/src/App.css
  • frontend/src/App.test.tsx
  • frontend/src/App.tsx
  • frontend/src/components/LeftoverPairList.test.tsx
  • frontend/src/components/LeftoverPairList.tsx
  • frontend/src/i18n.ts
📝 Walkthrough

Walkthrough

잔여 closest/farthest pair를 선택하면 게시물이 Post quality의 관련 기준과 함께 열립니다. 해당 기준 행은 aria-current로 표시되고, Post quality 제목에 포커스가 이동합니다. 로그인 반환 URL과 2.12.8 릴리스 정보도 갱신했습니다.

Changes

잔여 기준 평가 랜딩

Layer / File(s) Summary
잔여 기준 랜딩 계약
docs/adr/0158-leftover-criterion-evaluation-landing.md, docs/adr/0049-leftover-pair-report-ui.md, AGENTS.md, ARCHITECTURE.md
잔여 pair 클릭 시 pair_kindcriterion_code를 전달하고, Post quality의 관련 기준을 현재 항목으로 표시하는 동작을 문서화했습니다.
잔여 기준 UI 흐름
frontend/src/App.tsx, frontend/src/App.css, frontend/src/i18n.ts, frontend/src/App.test.tsx
잔여 기준 정보를 게시물 상세와 평가 패널로 전달합니다. Post quality 제목에 포커스를 이동하고, 기준 행에 aria-current="true"와 시각적 표시를 적용합니다. closest/farthest 동작과 일반 게시물 열기 동작을 테스트합니다.
로그인 및 릴리스 반영
frontend/src/App.tsx, frontend/src/App.test.tsx, frontend/package.json, pyproject.toml, CHANGELOG.md, CHANGELOG.d/2.12.8-leftover-criterion-evaluation-landing.md
OIDC 반환 URL을 returnUrlFromLocation()rememberOidcReturnUrl로 저장합니다. 비인증 화면의 관리자 패널 렌더링을 제거합니다. 프로젝트 버전과 2.12.8 변경 로그를 갱신합니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🔵 Low · up to 216c9

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로 표시
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 leftover pair 클릭 시 명명된 Post quality 기준으로 이동하는 주요 변경 사항을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/leftover-criterion-evaluation-landing-v2128

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.

The closest leftover path already marked sales-lead current. Also assert
the farthest pair names the leftover criterion next action after open.

Copy link
Copy Markdown
Contributor Author

Pushed 15f287b with farthest leftover landing coverage. Independent exact-head APPROVE is still required. I will not self-approve or squash-merge.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae

Copy link
Copy Markdown
Contributor Author

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; openai-direct/gpt-5.6-luna then failed because LiteLLM received no recognized provider prefix. Both completed model attempts displayed 0 vulnerabilities, and the workflow correctly failed closed because no authoritative report artifact was produced. No source patch or identical rerun is justified until the central provider-normalization/recovery evidence changes.

- 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.
@seonghobae
seonghobae enabled auto-merge (squash) August 23, 2026 14:13
coderabbitai[bot]

This comment was marked as resolved.

@github-actions
github-actions Bot disabled auto-merge August 23, 2026 14:26
devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Cycle 2026-08-24T03:49 KST write retry. Independent exact-head APPROVE still required; this identity will not self-approve. Leftover-map axis share is a separate PR onto main and will not mix into this criterion-landing stack. Issues #79/#87 stay open.

seonghobae added a commit that referenced this pull request Aug 23, 2026
)

* 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
seonghobae added a commit that referenced this pull request Aug 23, 2026
* 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.
seonghobae added a commit that referenced this pull request Aug 24, 2026
* 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.
seonghobae added a commit that referenced this pull request Aug 24, 2026
)

* 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.
@seonghobae
seonghobae enabled auto-merge August 24, 2026 01:24
@opencode-agent
opencode-agent Bot disabled auto-merge August 24, 2026 04:40
# 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
devin-ai-integration[bot]

This comment was marked as resolved.

…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).
@seonghobae
seonghobae enabled auto-merge August 24, 2026 05:55

@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 1 new potential issue.

Open in Devin Review

Comment thread frontend/src/i18n.ts
Comment on lines +335 to +336
"Open this post so the leftover criterion is current in Post quality.":
"이 글을 열어 잔여 기준이 게시글 품질에서 현재 항목이 되게 하세요.",

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: 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.

Open in Devin Review

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

@github-actions
github-actions Bot disabled auto-merge August 24, 2026 06:32
@seonghobae
seonghobae enabled auto-merge August 24, 2026 07:32
@opencode-agent
opencode-agent Bot disabled auto-merge August 24, 2026 08:41

@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 1 new potential issue.

Open in Devin Review

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: 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)

Open in Devin Review

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

Copy link
Copy Markdown
Contributor Author

Leftover-map persist+2D UI restack is now #579 (v2.12.19). Criterion-node clicks on this persist stack open the leftover-pair post only (ADR 0126); they do not set leftover-focus on Post quality. #485 remains the landing increment. Independent review only — never self-approve.

@seonghobae
seonghobae enabled auto-merge August 24, 2026 11:50
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