Skip to content

fix(navigation): keep active destination visible - #1608

Draft
seonghobae wants to merge 16 commits into
codex/localize-skip-linkfrom
codex/desktop-navigation-width
Draft

fix(navigation): keep active destination visible#1608
seonghobae wants to merge 16 commits into
codex/localize-skip-linkfrom
codex/desktop-navigation-width

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Current authority — 2026-09-10

  • base: #1601@f9cbc828ce481f259c940d809ddb7fc573ea66d5
  • exact head: 72bfd55426602147277b543de6103cd4b88b7644
  • lifecycle: Draft / constrained-navigation descendant / do not merge
  • effective delta over current fix(a11y): localize the workspace skip link #1601: exactly 2 files; fresh compare is ahead-only (behind_by=0).

Current head preserves predecessor #1608 as first parent and adopts repaired #1601 as second parent through a non-force ordinary restack. Its owned source remains the bounded active-destination visibility behavior in DashboardLayout.tsx and the associated regression test; inherited security, Today recovery, customer-copy and skip-link source stay with ancestors.

No open descendant is currently known to require another restack. Pre-restack checks/reviews are predecessor evidence only. This exact head currently has no PR-triggered hosted workflow run.

UI Delivery Gate: FAIL

Intentionality and bounded-content scope are PASS. Current-head hosted execution, rendered responsive/touch/keyboard/AT evidence, applicable locale expansion coverage and a qualifying independent review remain incomplete.

Signed-off-by: Seongho Bae <me@seonghobae.me>
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 4a1a360e-8a4f-4ce0-a438-e27603421d38

📥 Commits

Reviewing files that changed from the base of the PR and between deebb75 and ef1fd4c.

📒 Files selected for processing (2)
  • frontend/src/components/DashboardLayout.test.tsx
  • frontend/src/components/DashboardLayout.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The dashboard primary navigation now keeps the active destination within a 16px horizontal inset. It responds to window resizing, adds navigation padding, and includes tests for initial scrolling, visible links, resize handling, and timer cleanup.

Changes

Primary navigation scrolling

Layer / File(s) Summary
Active link scroll behavior
frontend/src/components/DashboardLayout.tsx
PrimaryNavLink measures the active link and navigation bounds, then updates scrollLeft when the link leaves a 16px inset. The navigation adds horizontal padding.
Scroll behavior tests
frontend/src/components/DashboardLayout.test.tsx
Tests verify initial scrolling, no scrolling for visible links, resize-triggered scrolling, active-link state, and timer restoration.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to ef1fd

Desktop primary navigation now keeps the active destination visible with a 16 px inset during activation and resizing, while preserving mobile navigation behavior. No current merge-blocking risk is identified.

Sequence Diagram(s)

sequenceDiagram
  participant PrimaryNavLink
  participant nav
  participant window
  PrimaryNavLink->>nav: measure navigation and active link bounds
  PrimaryNavLink->>nav: set scrollLeft when link exceeds 16px inset
  window->>PrimaryNavLink: dispatch resize event
  PrimaryNavLink->>nav: re-measure and update scrollLeft
Loading
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: keeping the active navigation destination visible during horizontal scrolling.
✨ 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 codex/desktop-navigation-width

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.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Visual inspection receipt for exact head b1fcd330:

  • Real production server: next start, localhost:3001
  • Viewports: desktop 1440x1024, mobile 390x844
  • Routes: full product smoke 10 routes passed
  • Directly inspected: desktop-search.png, mobile-search.png
  • Observed: desktop active 맥락 검색 is fully visible within the constrained primary navigation; mobile header and bottom navigation remain usable.
  • Scope note: Search result internal identifiers visible in the fixture are tracked by fix(search): hide internal relationship plumbing #1603 and are not claimed as fixed here.
  • Artifact paths: /var/folders/y8/zrckcwmj2f90jbjq6ktjhj9m0000gn/T/naruon-full-product-smoke-uCXcF2/desktop-search.png, /var/folders/y8/zrckcwmj2f90jbjq6ktjhj9m0000gn/T/naruon-full-product-smoke-uCXcF2/mobile-search.png

@seonghobae seonghobae added bug Something isn't working priority: medium Normal-priority or P2 work labels Sep 8, 2026 — with ChatGPT Codex Connector

Copy link
Copy Markdown
Contributor Author

Design assurance exact-head acceptance — 456892c79fbee72bf753d37240206d12c7463f87

Single-writer repair와 two-file delta 보존은 적합합니다. 다만 current regression은 jsdom에서 Element.prototype.scrollIntoView를 spy하고 option 호출만 확인합니다. 실제 horizontal overflow container에서 active destination이 viewport/inset 안에 들어왔는지, already-visible route에서 불필요한 scroll이 없는지, rapid route changes·resize·unmount cleanup·focus가 보존되는지는 증명하지 않습니다. Exact head에 repository-owned hosted workflow도 0건입니다.

Owner acceptance:

  • actual Chromium constrained desktop/intermediate widths에서 before overflow → route activation → active link bounding box가 nav client rect와 scroll-px-3 inset 안에 위치
  • already-visible/idempotent case, rapid route changes, resize/orientation, back/forward, reload/persisted route, unmount lifecycle
  • keyboard focus와 pointer/touch horizontal navigation, reduced-motion 및 no unexpected page/body scroll
  • 320/390/중간/1440 screenshots와 accessibility tree/aria-current
  • ko/en/ja/zh/vi/es/de/fr expansion/wrapping/font fallback
  • fix(a11y): localize the workspace skip link #1601 protected integration 후 ordinary non-force restack 및 새 exact-head Checks/independent review

현재 Draft / UI Delivery Gate FAIL이 맞으며 predecessor screenshots/status transport는 current-head merge evidence가 아닙니다. Dedicated-writer ownership 때문에 source/ref/state는 변경하지 않았습니다.

Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae

Copy link
Copy Markdown
Contributor Author

Follow-up repair on exact head 5fc69fcb: added repository-owned Playwright smoke geometry assertion for the desktop Search route. It checks the active aria-current="page" destination remains inside the primary navigation visible inset, so the test now covers actual Chromium layout geometry rather than only jsdom scrollIntoView invocation. pnpm lint, node --check, and git diff --check pass. Prior direct desktop/mobile visual inspection remains limited to head 456892c7; a fresh screenshot receipt is still required for this new head.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact head: 2247e74a89b5b3a655247f582f9dde7a5b06c3c1
Base: codex/localize-skip-link

Root-cause repair:

  • Real Chromium desktop geometry smoke first reproduced the active Search link crossing the visible navigation right inset by ~0.42px.
  • DashboardLayout now measures the active link after layout and adjusts the shared navigation scroll position with a 16px internal buffer, preserving at least the required 12px visible inset.
  • The component test now verifies the scroll correction contract; focused result: 6 passed.
  • The shared smoke assertion was retained only in the verified harness workstream and was removed by the concurrent normal commit 086f1c0a; the production Chromium run remains the direct visual/geometry evidence.

Verification:

  • pnpm lint: passed.
  • Production build: passed (16/16 routes, TypeScript passed).
  • Production next start + Playwright Chromium smoke: passed for desktop 1440x1024 and mobile 390x844 across the full product route set.
  • Fresh screenshots directly inspected:
    • desktop Search: /var/folders/y8/zrckcwmj2f90jbjq6ktjhj9m0000gn/T/naruon-full-product-responsive-qa-YG2EJu/desktop-search.png
    • mobile Search: /var/folders/y8/zrckcwmj2f90jbjq6ktjhj9m0000gn/T/naruon-full-product-responsive-qa-YG2EJu/mobile-search.png
      Both show the active navigation and content without clipping or overlap at the tested viewports.

Remaining acceptance scope:

  • This evidence does not claim 8-locale, 320px, intermediate-width, orientation, browser back/forward, reload, or separate device/mobile visual coverage. The PR remains Draft pending the dedicated UI acceptance review and current required Checks.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Visual Inspection receipt — exact head 2247e74a89b5b3a655247f582f9dde7a5b06c3c1

  • Captured from the exact detached head at local http://127.0.0.1:18081 with Playwright: desktop 1280x1024 and mobile 390x844; routes / and /search.
  • Direct image inspection: desktop top navigation keeps Home/Search active states and spacing; mobile bottom navigation remains visible without clipping; Search error and Mail loading surfaces remain contained without overlap.
  • Desktop Home rendered a blank data area, so this receipt proves navigation/layout rendering only, not product data or backend success.
  • Receipts: /private/tmp/naruon-1608-visual/desktop-home.png, /private/tmp/naruon-1608-visual/desktop-search.png, /private/tmp/naruon-1608-visual/mobile-home.png, /private/tmp/naruon-1608-visual/mobile-search.png.
  • CUA foreground-browser inspection was unavailable because macOS was locked; headless render plus direct image inspection was used and recorded explicitly.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head repair receipt for bc08bb938:

  • Root cause: the scroll correction requested a 16 px inset, but a browser clamps scrollLeft at its maximum. With no trailing layout space, /settings stopped at ~0.2 px even though the DOM-unit mock reported 16 px.
  • Fix: give the shared desktop navigation 16 px inline padding, so the browser can preserve the same inset at either end. No new dependency or abstraction.
  • Full frontend suite: 55 passed, 487 passed, terminal exit 0.
  • Production build: Next.js 16.2.12, 16 routes, terminal exit 0.
  • Visual inspection: exact head bc08bb938, Chromium/Edge, 1280x720, locale ko, production /settings, backend unavailable. Direct screenshot inspection found the active 설정 item visible without clipping or overlap; measured right inset 16.234375px (navRight=398.375, activeRight=382.140625). The pre-fix exact head d8cc3a717 measured only 0.234375px at the same viewport and state.
  • Scope boundary: this verifies the desktop header and settings empty/runtime-unavailable state only; it is not mobile, eight-locale, authenticated-backend, or deployment evidence.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact head ef1fd4ce6cd626585a65182ddda98b331682a3ef only. Focus on the two-file DashboardLayout delta, especially the real-browser scrollLeft clamp correction (px-4 container padding), resize lifecycle/animation-frame cleanup, keyboard/focus behavior, and whether the regression tests can pass while the active destination is still clipped. Do not transfer predecessor review state.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

target="ef1fd4ce6cd626585a65182ddda98b331682a3ef"

echo "== Checked-out commit =="
git rev-parse HEAD
git status --short
git cat-file -t "$target"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$target"

echo
echo "== Target diff inventory against first parent =="
base="$(git rev-parse "${target}^1")"
git diff --name-status "$base" "$target"
git diff --stat "$base" "$target"

echo
echo "== Changed-file outlines =="
ast-grep outline frontend/src/components/DashboardLayout.tsx --items all || true
ast-grep outline frontend/src/components/DashboardLayout.test.tsx --items all || true

echo
echo "== Production diff =="
git diff --no-ext-diff --unified=100 "$base" "$target" -- frontend/src/components/DashboardLayout.tsx

echo
echo "== Test diff =="
git diff --no-ext-diff --unified=100 "$base" "$target" -- frontend/src/components/DashboardLayout.test.tsx

echo
echo "== Relevant implementation and test references =="
rg -n -C 5 --glob 'DashboardLayout.tsx' --glob 'DashboardLayout.test.tsx' \
  '(scrollLeft|requestAnimationFrame|cancelAnimationFrame|resize|aria-current|scroll-px-3|px-4|focus|keydown|pointer|touch|ResizeObserver)' \
  frontend/src/components

Length of output: 43270


🏁 Script executed:

#!/bin/bash
set -euo pipefail

target="ef1fd4ce6cd626585a65182ddda98b331682a3ef"
repo="ContextualWisdomLab/naruon"

echo "== Pull request metadata =="
gh pr view 1608 --repo "$repo" --json number,state,isDraft,baseRefName,baseRefOid,headRefName,headRefOid,url

echo
echo "== Base-to-target effective inventory =="
base="$(gh pr view 1608 --repo "$repo" --json baseRefOid --jq '.baseRefOid')"
echo "base=$base"
git cat-file -e "${base}^{commit}"
git diff --name-status "$base" "$target"
git diff --stat "$base" "$target"

echo
echo "== DashboardLayout implementation =="
sed -n '205,275p' frontend/src/components/DashboardLayout.tsx
sed -n '350,395p' frontend/src/components/DashboardLayout.tsx

echo
echo "== Focused regression setup and assertions =="
sed -n '1,125p' frontend/src/components/DashboardLayout.test.tsx

echo
echo "== Browser-test and configuration candidates =="
fd -HI -t f 'playwright|vitest|package\.json' . | sort
rg -n -C 4 --hidden \
  '(Primary workspace navigation|aria-current="page"|getBoundingClientRect\(\)|scrollLeft|desktop.*[Ss]earch|Search.*geometry)' \
  -g '*.{ts,tsx,js,mjs,cjs,json}' .

Length of output: 33381


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base="deebb752fb0c0095f83af79a1bb7ec33eecddef0"
target="ef1fd4ce6cd626585a65182ddda98b331682a3ef"

echo "== Exact effective diff with line context =="
git diff --no-ext-diff --unified=30 "$base" "$target" -- \
  frontend/src/components/DashboardLayout.tsx \
  frontend/src/components/DashboardLayout.test.tsx

echo
echo "== Browser configuration =="
sed -n '1,240p' frontend/playwright.config.ts
sed -n '1,220p' frontend/package.json

echo
echo "== Primary-navigation browser coverage =="
sed -n '1,110p' frontend/tests/e2e/dashboard-branding.spec.ts
sed -n '330,390p' frontend/tests/e2e/dashboard-branding.spec.ts

echo
echo "== Focus-related changes in the effective delta =="
git diff --no-ext-diff --unified=10 "$base" "$target" -- \
  frontend/src/components/DashboardLayout.tsx \
  frontend/src/components/DashboardLayout.test.tsx \
  | rg -n -C 4 '(focus|keydown|onKey|tabIndex|pointer|touch|scrollLeft|requestAnimationFrame|cancelAnimationFrame|resize|px-4)' || true

Length of output: 33614


@seonghobae I reviewed exact head ef1fd4ce6cd626585a65182ddda98b331682a3ef against base deebb752fb0c0095f83af79a1bb7ec33eecddef0. The effective delta contains only the two requested DashboardLayout files.

Finding: The regression can pass while the active link remains clipped

DashboardLayout.test.tsx uses jsdom and mocks fixed link and navigation rectangles. It asserts primaryNav.scrollLeft === 26, but it does not model:

  • the browser maximum scrollLeft;
  • the scrollable width created by px-4;
  • the active link rectangle after the scroll write.

Therefore, the test passes if a real browser clamps the write before the active destination reaches the 16px right inset. It also passes if the px-4 token exists but does not provide reachable trailing scroll space in the computed layout.

Add a Playwright regression at a width that overflows the desktop primary navigation. Navigate to a far-right active destination such as /settings. Then assert after layout that:

activeRect.left >= navRect.left + 16
activeRect.right <= navRect.right - 16

This test must use the actual browser scrollLeft behavior. It should fail without the trailing px-4 space.

The resize lifecycle is structurally correct. Each active link owns one resize listener. The effect cancels the previous animation frame before it schedules another frame. Cleanup removes the listener and cancels the pending frame.

The delta does not change keyboard handlers or focus handling. The scrollLeft correction does not move focus. However, the current tests do not verify keyboard focus retention or cleanup behavior after unmount.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact head 242bccd218a45c260334b9879256221425f2bb20 only. This ordinary two-parent restack adopts repaired #1601 9b503911... after ancestor AGENTS ownership was restored. Verify the effective child delta remains exactly the two DashboardLayout navigation files, the real-browser scroll-clamp repair (px-4) and resize/animation-frame cleanup remain intact, and no governance/Gap delta re-entered. The predecessor ef1fd4ce... approval does not transfer.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

target="242bccd218a45c260334b9879256221425f2bb20"
repaired_1601="9b503911"
repo="ContextualWisdomLab/naruon"

echo "== Target and parent topology =="
git cat-file -t "$target"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$target"
for parent in $(git show -s --format=%P "$target"); do
  echo "-- parent $parent --"
  git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$parent"
  if git merge-base --is-ancestor "$repaired_1601" "$parent"; then
    echo "contains_repaired_1601=yes"
  else
    echo "contains_repaired_1601=no"
  fi
  echo "paths changed from parent to target:"
  git diff --name-status "$parent" "$target"
done

echo
echo "== PR metadata and base-to-target inventory =="
gh pr view 1608 --repo "$repo" --json number,state,isDraft,baseRefName,baseRefOid,headRefName,headRefOid,url
base="$(gh pr view 1608 --repo "$repo" --json baseRefOid --jq '.baseRefOid')"
echo "base=$base"
git diff --name-status "$base" "$target"
git diff --stat "$base" "$target"

echo
echo "== Child-specific two-parent comparison =="
parents=($(git show -s --format=%P "$target"))
for parent in "${parents[@]}"; do
  echo "-- diff $parent..$target --"
  git diff --stat "$parent" "$target"
  git diff --name-status "$parent" "$target"
done

echo
echo "== Changed-file outlines =="
ast-grep outline frontend/src/components/DashboardLayout.tsx --items all
ast-grep outline frontend/src/components/DashboardLayout.test.tsx --items all

echo
echo "== Navigation implementation and component tests =="
rg -n -C 12 --glob 'DashboardLayout.tsx' --glob 'DashboardLayout.test.tsx' \
  '(PrimaryNavLink|isActiveDestination|primary-navigation|scrollLeft|requestAnimationFrame|cancelAnimationFrame|addEventListener|removeEventListener|resize|px-4|aria-current|getBoundingClientRect)' \
  frontend/src/components

echo
echo "== Exact target diffs for requested files against PR base =="
git diff --no-ext-diff --unified=40 "$base" "$target" -- \
  frontend/src/components/DashboardLayout.tsx \
  frontend/src/components/DashboardLayout.test.tsx

echo
echo "== Browser regression candidates =="
fd -HI -t f . frontend/tests frontend 2>/dev/null | rg '(playwright|\.spec\.(ts|tsx|js)|\.e2e\.(ts|tsx|js))$' || true
rg -n -C 8 --hidden -g '*.{ts,tsx,js,mjs,cjs}' \
  '(primary navigation|Primary workspace navigation|aria-current="page"|scrollLeft|getBoundingClientRect|visible inset|/settings)' \
  frontend/tests frontend/src 2>/dev/null || true

Length of output: 149840


@seonghobae I reviewed exact head 242bccd218a45c260334b9879256221425f2bb20 against PR base 9b50391133c94f9472b84dabd3f84714e5492c3d. This is a new review. It does not use predecessor approval state.

The effective child delta changes exactly these two files:

  • frontend/src/components/DashboardLayout.tsx
  • frontend/src/components/DashboardLayout.test.tsx

No governance or GAP file changes exist in the base-to-head diff. The other merge-parent comparison shows only the expected removal from AGENTS.md during ancestor-state reconciliation.

px-4 remains on the desktop primary navigation. The visibility correction still cancels its pending animation frame before rescheduling. Cleanup still removes the resize listener and cancels the pending animation frame.

Finding: The regression can still pass while browser scroll clamping clips the active destination

DashboardLayout.test.tsx still uses jsdom geometry mocks. It verifies that the code requests scrollLeft === 26, but it does not model the browser maximum scrollLeft or remeasure the active link after the scroll write.

The inspected Playwright tests do not contain a geometry assertion for the desktop primary navigation. Therefore, the regression can pass if Chromium clamps scrollLeft before /settings reaches the required 16 px right inset.

Add a Playwright regression at a constrained desktop width. Navigate to /settings. Then assert the active link is inside the navigation inset after layout:

activeRect.left >= navRect.left + 16
activeRect.right <= navRect.right - 16

This test must run with the real browser scroll container. It must fail if trailing space from px-4 is removed.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Preserve the two-file constrained-navigation repair while ordinary-adopting #16012515021 and the canonical #1623 frontend security ancestry. No force update or child delta loss.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact head b4c2bb14f8e22e71173857db4f7b6a7fbfba316f after the ordinary restack onto #1601@25150210.... The effective child delta remains exactly the two constrained-navigation files; predecessor approvals are stale after this source-changing ancestry update.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="ContextualWisdomLab/naruon"
target="b4c2bb14f8e22e71173857db4f7b6a7fbfba316f"
expected_1601_prefix="25150210"

echo "== Target identity and topology =="
git cat-file -e "${target}^{commit}"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$target"
for parent in $(git show -s --format=%P "$target"); do
  git show -s --format='parent=%H%nsubject=%s' "$parent"
  if git merge-base --is-ancestor "$expected_1601_prefix" "$parent" 2>/dev/null; then
    echo "contains_1601_25150210=yes"
  else
    echo "contains_1601_25150210=no"
  fi
done

echo
echo "== PR metadata and effective inventory =="
gh pr view 1608 --repo "$repo" --json number,isDraft,baseRefName,baseRefOid,headRefName,headRefOid,url
base="$(gh pr view 1608 --repo "$repo" --json baseRefOid --jq '.baseRefOid')"
printf 'base=%s\ntarget=%s\n' "$base" "$target"
git diff --name-status "$base" "$target"
git diff --stat "$base" "$target"

echo
echo "== Exact effective diff =="
git diff --no-ext-diff --unified=45 "$base" "$target" -- \
  frontend/src/components/DashboardLayout.tsx \
  frontend/src/components/DashboardLayout.test.tsx

echo
echo "== Implementation and unit-test structure =="
ast-grep outline frontend/src/components/DashboardLayout.tsx --items all
ast-grep outline frontend/src/components/DashboardLayout.test.tsx --items all
rg -n -C 12 --glob 'DashboardLayout.tsx' --glob 'DashboardLayout.test.tsx' \
  '(PrimaryNavLink|isActiveDestination|primary-navigation|aria-current|scrollLeft|requestAnimationFrame|cancelAnimationFrame|addEventListener|removeEventListener|resize|px-4|getBoundingClientRect|focus)' \
  frontend/src/components

echo
echo "== Browser regression candidates and geometry assertions =="
fd -HI -t f . frontend | rg '(^|/)(tests|e2e)/.*\.(spec|test)\.(ts|tsx|js)$|playwright\.config\.(ts|js)$'
rg -n -C 10 --hidden -g '*.{ts,tsx,js,mjs,cjs}' \
  '(Primary workspace navigation|primary-navigation|aria-current="page"|scrollLeft|visible inset|boundingBox\(|getBoundingClientRect\(|/settings|/search)' \
  frontend/tests frontend/src 2>/dev/null || true

echo
echo "== Non-navigation effective files, if any =="
git diff --name-only "$base" "$target" | grep -vE '^frontend/src/components/DashboardLayout(\.test)?\.tsx$' || true

Length of output: 198278


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="ContextualWisdomLab/naruon"
target="b4c2bb14f8e22e71173857db4f7b6a7fbfba316f"
base="$(gh pr view 1608 --repo "$repo" --json baseRefOid --jq '.baseRefOid')"

echo "== PR and target =="
gh pr view 1608 --repo "$repo" --json headRefOid,baseRefOid,isDraft,url
git show -s --format='target=%H%nparents=%P%nsubject=%s' "$target"
printf 'base=%s\n' "$base"

echo
echo "== Effective child file list =="
git diff --name-status "$base" "$target"
count="$(git diff --name-only "$base" "$target" | wc -l | tr -d ' ')"
printf 'effective_file_count=%s\n' "$count"

echo
echo "== Required implementation lines at target =="
git show "$target:frontend/src/components/DashboardLayout.tsx" | nl -ba | sed -n '215,258p;378,391p'

echo
echo "== Target-only browser geometry coverage =="
git diff --no-ext-diff --unified=8 "$base" "$target" -- frontend/tests/e2e \
  || true

echo
echo "== Existing browser geometry checks for this nav =="
rg -n -U --glob '*.{spec,test}.{ts,tsx,js}' \
  'Primary workspace navigation[\s\S]{0,1800}(getBoundingClientRect|boundingBox|aria-current|scrollLeft)|\
(getBoundingClientRect|boundingBox|aria-current|scrollLeft)[\s\S]{0,1800}Primary workspace navigation' \
  frontend/tests/e2e || true

echo
echo "== Unit test assertions at target =="
git show "$target:frontend/src/components/DashboardLayout.test.tsx" | nl -ba | sed -n '35,118p'

Length of output: 2458


🏁 Script executed:

#!/bin/bash
set -euo pipefail

target="b4c2bb14f8e22e71173857db4f7b6a7fbfba316f"

echo "== PrimaryNavLink target implementation =="
git show "$target:frontend/src/components/DashboardLayout.tsx" \
  | awk 'NR >= 215 && NR <= 258 { printf "%5d  %s\n", NR, $0 }'

echo
echo "== Desktop primary-navigation markup =="
git show "$target:frontend/src/components/DashboardLayout.tsx" \
  | awk 'NR >= 378 && NR <= 391 { printf "%5d  %s\n", NR, $0 }'

echo
echo "== Relevant target unit tests =="
git show "$target:frontend/src/components/DashboardLayout.test.tsx" \
  | awk 'NR >= 35 && NR <= 118 { printf "%5d  %s\n", NR, $0 }'

echo
echo "== Browser-test geometry assertions for primary navigation =="
rg -n -U --glob '*.{spec,test}.{ts,tsx,js}' \
  'Primary workspace navigation[\s\S]{0,1800}(getBoundingClientRect|boundingBox|aria-current|scrollLeft)|\
(getBoundingClientRect|boundingBox|aria-current|scrollLeft)[\s\S]{0,1800}Primary workspace navigation' \
  frontend/tests/e2e || true

echo
echo "== Browser-test changes in effective child delta =="
base="251502101b15c328f53882d9b8e73fd3c3b7ba50"
git diff --name-status "$base" "$target" -- frontend/tests/e2e

Length of output: 9862


@seonghobae I reviewed exact head b4c2bb14f8e22e71173857db4f7b6a7fbfba316f against base 251502101b15c328f53882d9b8e73fd3c3b7ba50. This is a new review.

The effective child delta modifies exactly these files:

  • frontend/src/components/DashboardLayout.tsx
  • frontend/src/components/DashboardLayout.test.tsx

No governance or GAP file is in the effective delta.

The desktop primary navigation retains px-4. The visibility effect still cancels a pending animation frame before it schedules a new frame. Its cleanup removes the resize listener and cancels the pending animation frame. The correction does not change keyboard focus.

Finding: The regression still cannot detect browser scroll clamping

DashboardLayout.test.tsx uses mocked rectangles. Line 70 asserts that jsdom accepts scrollLeft === 26. It does not model the maximum browser scrollLeft, layout-created trailing space, or the active-link rectangle after the scroll write.

The inspected Playwright coverage has no geometry assertion for Primary workspace navigation. Therefore, the tests can pass when Chromium clamps scrollLeft and the active destination remains inside the navigation clip area.

Add a Playwright regression at a constrained desktop width. Navigate to /settings, wait for layout, and assert that the active link is inside the navigation inset:

expect(activeRect.left).toBeGreaterThanOrEqual(navRect.left + 16);
expect(activeRect.right).toBeLessThanOrEqual(navRect.right - 16);

The test must use the actual scroll container. It must fail if px-4 is removed.

You are interacting with an AI system.

Preserve the existing two-file constrained-navigation repair while ordinary-adopting current #1601996e563 and its #1578/#1570 project-folder contract ancestry. No force update or UI delta loss.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact head c2acf617245a38775379ff258887b9a931baa336 only after the ordinary two-parent restack onto current #1601 996e563db4457a52d0b16840e78d23f2eb2edbe4. Verify the constrained-navigation behavior remains a two-file delta and that inherited Today/customer-copy/security changes do not introduce a conflicting interaction. Do not transfer predecessor approval.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="ContextualWisdomLab/naruon"
target="c2acf617245a38775379ff258887b9a931baa336"
expected_parent="996e563db4457a52d0b16840e78d23f2eb2edbe4"

echo "== Target identity and topology =="
git cat-file -e "${target}^{commit}"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$target"
for parent in $(git show -s --format=%P "$target"); do
  echo "-- parent: $parent --"
  git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$parent"
  if git merge-base --is-ancestor "$expected_parent" "$parent"; then
    echo "contains_expected_1601=yes"
  else
    echo "contains_expected_1601=no"
  fi
  echo "parent_to_target_paths:"
  git diff --name-status "$parent" "$target"
done

echo
echo "== Pull request metadata and effective inventory =="
gh pr view 1608 --repo "$repo" --json number,isDraft,baseRefName,baseRefOid,headRefName,headRefOid,url
base="$(gh pr view 1608 --repo "$repo" --json baseRefOid --jq '.baseRefOid')"
printf 'base=%s\ntarget=%s\n' "$base" "$target"
git diff --name-status "$base" "$target"
git diff --stat "$base" "$target"

echo
echo "== Effective non-DashboardLayout paths =="
git diff --name-only "$base" "$target" \
  | grep -vE '^frontend/src/components/DashboardLayout(\.test)?\.tsx$' || true

echo
echo "== Target navigation implementation and unit tests =="
ast-grep outline frontend/src/components/DashboardLayout.tsx --items all
ast-grep outline frontend/src/components/DashboardLayout.test.tsx --items all
git show "$target:frontend/src/components/DashboardLayout.tsx" \
  | nl -ba | sed -n '205,275p;365,400p'
git show "$target:frontend/src/components/DashboardLayout.test.tsx" \
  | nl -ba | sed -n '1,145p'

echo
echo "== Effective navigation diff =="
git diff --no-ext-diff --unified=45 "$base" "$target" -- \
  frontend/src/components/DashboardLayout.tsx \
  frontend/src/components/DashboardLayout.test.tsx

echo
echo "== Inherited work from expected `#1601` parent, relative to its first parent =="
parent_base="$(git rev-parse "${expected_parent}^1")"
printf 'expected_parent_base=%s\n' "$parent_base"
git diff --name-status "$parent_base" "$expected_parent"
git diff --stat "$parent_base" "$expected_parent"

echo
echo "== Relevant inherited-code references and effective changes =="
git diff --no-ext-diff --unified=20 "$parent_base" "$expected_parent" -- \
  | rg -n -C 5 '(Today|today|customer|copy|security|DashboardLayout|primary-navigation|scrollLeft|resize|requestAnimationFrame)' || true

echo
echo "== Cross-references in target source =="
rg -n -C 4 --glob '*.{ts,tsx}' \
  '(DashboardLayout|primary-navigation|PrimaryNavLink|scrollLeft|aria-current|Today|today|customer|security)' \
  frontend/src 2>/dev/null || true

echo
echo "== Browser geometry coverage at target =="
fd -HI -t f . frontend | rg '(^|/)(tests|e2e)/.*\.(spec|test)\.(ts|tsx|js)$|playwright\.config\.(ts|js)$' || true
rg -n -U --glob '*.{spec,test}.{ts,tsx,js}' \
  'Primary workspace navigation[\s\S]{0,1800}(getBoundingClientRect|boundingBox|aria-current|scrollLeft)|\
(getBoundingClientRect|boundingBox|aria-current|scrollLeft)[\s\S]{0,1800}Primary workspace navigation' \
  frontend/tests/e2e 2>/dev/null || true

Length of output: 129223


@seonghobae I reviewed exact head c2acf617245a38775379ff258887b9a931baa336 against base 996e563db4457a52d0b16840e78d23f2eb2edbe4. This is a new review. I did not transfer predecessor approval state.

The effective child delta modifies exactly these files:

  • frontend/src/components/DashboardLayout.tsx
  • frontend/src/components/DashboardLayout.test.tsx

No governance or GAP file re-entered the effective delta.

The inherited project-folder contract changes modify WorkspaceHome.tsx and its test. They do not modify DashboardLayout.tsx. I found no conflicting interaction with the inherited Today, customer-copy, or security behavior.

The constrained-navigation repair remains intact:

  • The desktop primary navigation retains px-4.
  • The active destination retains aria-current="page".
  • The effect cancels a pending animation frame before it schedules a new frame.
  • Cleanup removes the resize listener and cancels the pending animation frame.
  • The correction changes scrollLeft only. It does not change keyboard focus.

Finding: The regression can still pass when browser scroll clamping clips the active destination

DashboardLayout.test.tsx uses jsdom rectangle mocks. It asserts that the code requests scrollLeft === 26. It does not model the maximum browser scrollLeft, the trailing scroll space from px-4, or the active-link rectangle after the browser applies the scroll write.

The inspected Playwright coverage has no desktop primary-navigation geometry assertion. Therefore, the tests can pass if Chromium clamps the requested scroll position before the active destination reaches the 16 px right inset.

Add a constrained-desktop Playwright regression for a far-right route such as /settings. After layout, assert:

expect(activeRect.left).toBeGreaterThanOrEqual(navRect.left + 16);
expect(activeRect.right).toBeLessThanOrEqual(navRect.right - 16);

The test must use the actual navigation scroll container. It must fail if the px-4 trailing space is removed.

You are interacting with an AI system.

Preserve the constrained-navigation two-file delta as first-parent history while adopting #1601's current parent chain, including the security regression repair and restored release-note ownership.

Signed-off-by: Seongho Bae <me@seonghobae.me>
Preserve #1608's two-file constrained-navigation delta while adopting #1601f9cbc82 as the current parent.

Signed-off-by: Seongho Bae <me@seonghobae.me>

Copy link
Copy Markdown
Contributor Author

@codex review

Review only exact head 72bfd55426602147277b543de6103cd4b88b7644 against current base f9cbc828ce481f259c940d809ddb7fc573ea66d5. The owned delta is exactly DashboardLayout.tsx and DashboardLayout.test.tsx for keeping the active destination visible under constrained navigation width. Verify keyboard/focus behavior, scroll correction bounds, resize/animation-frame cleanup, and that the restack preserves ancestor ownership.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

seonghobae added a commit that referenced this pull request Sep 10, 2026
Ordinary three-way integration of the three live-region changes into the active #1608 successor. Preserve the focused RED test and all existing Today/navigation source.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: medium Normal-priority or P2 work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant