Skip to content

fix: surface bounded scan and navigation failures - #202

Draft
seonghobae wants to merge 10 commits into
mainfrom
fix/scan-navigation-error-feedback-v1
Draft

fix: surface bounded scan and navigation failures#202
seonghobae wants to merge 10 commits into
mainfrom
fix/scan-navigation-error-feedback-v1

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Purpose

Prevent arbitrary backend exception text from crossing the primary disk-scan desktop boundary and make scan-result/navigation failures visible to users instead of console-only, without changing scan, cancellation, node traversal, top-file, filesystem-read, or cleanup authority.

Exact current state — 2026-08-24 KST

  • Exact source head: 1d005586b270ca1fcad445970cf44bf5e7268425 on fix/scan-navigation-error-feedback-v1.
  • Live main: 5f7c7ae38adafd1f3b3640016a8333767c89d78a.
  • Fresh main -> head comparison is ahead, 9 commits ahead / 0 behind, with merge base equal to live main.
  • Effective protected-base delta is exactly three buyer-facing/test files: src/routes/+page.svelte, src/routes/pageErrorFeedbackContract.test.ts, and src/routes/postScanGenerationContract.test.ts.
  • The PR is open, Ready, mechanically mergeable, and has had no source-head movement since the 2026-08-22 non-force main convergence commit. Ready/mergeable status is not merge authorization.

Current UI / operability contract

  • src/routes/+page.svelte projects root-discovery, scan-event, scan-start, post-scan-load, and navigation failures through bounded path-free operationError messages rendered in one role="alert" region.
  • Fixed payload-free operator diagnostics remain available (disk root load failed, post-scan result load failed, scan event registration failed, scan start failed, folder navigation failed) without restoring arbitrary exception text to UI or console.
  • scan() increments navSeq before state reset so in-flight navigation responses cannot repopulate stale node/crumb state after a new scan begins.
  • onScanDone captures the current generation before its async result load and rejects publication after a newer scan/navigation generation appears.
  • scan(), open(), and jump() clear stale feedback before issuing their requests; navigation keeps sequence-based stale-response rejection.
  • pageErrorFeedbackContract.test.ts scopes assertions to onMount, scan, open, and jump, binds the bounded diagnostics/messages to the correct handler, and requires stale feedback clearing before each new request.

Review disposition

The predecessor CodeRabbit navigation-race finding and predecessor OpenCode diagnostic-loss finding are implemented and their source threads are resolved. Two exact-head Devin comments from 2026-08-22 were informational rather than defects and are now resolved after re-reading the exact blob:

  1. the initial onScanDone scanning = false / operationError = "" reset executes synchronously before the callback reaches its first await, so a newly started scan cannot interleave before those writes and then be overwritten by them later; all post-await result publication is generation-guarded; and
  2. Devin's second comment independently confirms the scan-start generation bump correctly invalidates stale result loads.

There are now zero unresolved inline review threads. Formal reviews remain advisory/comment-only or predecessor-head evidence; no qualifying independent human approval is claimed.

Exact-head workflow evidence

On unchanged exact head 1d005586b270ca1fcad445970cf44bf5e7268425:

  • Test 32585786241 — terminal-success;
  • Release 32585786232 — terminal-success;
  • Security Scan 32585786243 — terminal-success;
  • SAST Semgrep 32585786222 — terminal-success.

Conditional PR-inapplicable publication/attestation jobs are not represented as passing evidence. Repository-native success is also not a substitute for then-live central coverage/review/security requirements.

Governance / shared-owner boundary

Fresh live main still reports protected: true while its effective branch-protection payload is enabled: false, required-status-check enforcement is off, and required contexts/checks are empty. Governance restoration remains tracked by #248; this PR must not infer merge authority from the protection badge or mechanical mergeability.

Repository-wide exact 100% owned-production region/statement-equivalent, branch, function, and line coverage remains owned by Draft #156 and is not satisfied by this feature-local evidence. This lane owns only primary scan/navigation feedback; Cleanup.svelte, TopFiles accessibility #203, Treemap accessibility #196, canonical documentation #149, and cleanup/cloud/provider authority remain outside scope.

Required before merge

Do not merge unless one unchanged latest head remains based on then-current main, effective branch/ruleset enforcement is actually live, every applicable CI/security/coverage/package/review gate is terminal-success, every valid current finding/thread is resolved, and any qualifying independent latest-push approval required by policy is present. Pending, queued, skipped-required, neutral-required, failed, stale, predecessor, synthetic, diagnostic-only, status-only, model-only, author-only, rate-limited, no-source-scanner, or infrastructure-only evidence is non-passing.


Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 422bb375-a15b-483a-b394-5d8e468a48b5

📝 Walkthrough

Walkthrough

페이지는 루트 조회, 스캔, 폴더 탐색 및 경로 이동의 실패를 화면 내 한국어 오류 메시지로 표시합니다. 스캔 결과는 노드와 상위 파일을 병렬로 조회합니다. 관련 오류 표시와 API 호출 계약 테스트를 추가했습니다.

Changes

페이지 오류 피드백

Layer / File(s) Summary
비동기 작업 오류 처리
src/routes/+page.svelte
루트 조회, 스캔 시작·완료, 폴더 열기 및 경로 이동의 실패를 operationError 상태로 관리합니다. 스캔 완료 후 노드와 상위 파일을 병렬로 조회합니다.
오류 표시 및 계약 검증
src/routes/+page.svelte, src/routes/pageErrorFeedbackContract.test.ts
role="alert" 오류 문단과 .error 스타일을 추가했습니다. 고정 한국어 오류 문구, 임의 예외 노출 방지, 주요 API 호출을 소스 기반 테스트로 검증합니다.

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

Mergeability Score: 🟡 Moderate · up to 682a6

A new scan can still be overwritten by an older navigation request, causing users to see stale folder results or breadcrumbs from the previous location. This localized correctness issue should be fixed or explicitly accepted before merge.

Sequence Diagram(s)

sequenceDiagram
  participant Browser as 브라우저
  participant Page as +page.svelte
  participant API as 조회·스캔 API
  Browser->>Page: 스캔 또는 탐색 요청
  Page->>API: 루트·스캔·노드·상위 파일 조회
  API-->>Page: 결과 또는 오류
  Page->>Page: operationError 갱신
  Page-->>Browser: 오류 메시지 또는 결과 표시
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 제목은 스캔 및 탐색 실패를 사용자에게 표시하는 주요 변경 사항을 간결하고 정확하게 설명합니다.
✨ 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 fix/scan-navigation-error-feedback-v1

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
seonghobae marked this pull request as ready for review August 13, 2026 01:14

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed.

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.

coderabbitai[bot]

This comment was marked as resolved.

@seonghobae
seonghobae marked this pull request as draft August 13, 2026 01:59

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please re-review the unchanged current exact head c50fdd3a1e4b2dfc6e624910ac81f7dea8e831b9. The predecessor review was anchored to 682a694ae3299924b371315f63c20f5a2b626a48; the current head now increments navSeq before scan reset and scopes the source-contract assertions to onMount, scan, open, and jump. Do not transfer predecessor findings if they are no longer reproducible.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

@seonghobae I will re-review exact head c50fdd3a1e4b2dfc6e624910ac81f7dea8e831b9. I will only report findings that reproduce on this head. I will check the scoped assertions for onMount, scan, open, and jump.

⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 1 minute.

@seonghobae
seonghobae marked this pull request as ready for review August 14, 2026 08:09
@opencode-agent

opencode-agent Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: c50fdd3a1e4b2dfc6e624910ac81f7dea8e831b9
  • Workflow run: 31863590966
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (exit 0)

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
Loading

opencode-agent[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review
@cwl-noema-review review

Re-review exact current head 669f71cd684a556c922e360da2212dad7ae70766 only. The prior OpenCode P2 thread on predecessor head c50fdd3a1e4b2dfc6e624910ac81f7dea8e831b9 requested bounded payload-free diagnostics; current head implements those fixed-string diagnostics in every affected failure path, the focused contract asserts them, and that thread is now resolved. Current-head repository Test, Release, Security Scan, and SAST Semgrep workflows are terminal-success. Do not transfer predecessor-head review evidence; reacquire current-head coverage/review evidence under the live central contract.

@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review August 22, 2026 07:38

Dismissing: this REQUEST_CHANGES (removed failure diagnostics) was addressed by commit 669f71c 'fix: retain bounded scan diagnostics', pushed after this review, which adds console.error(...) bounded diagnostics to every catch path (scan(), onScanDone inner catch, open(), jump(), and the onMount catches) while keeping the bounded user-facing operationError text. Verified: current head's catch blocks contain console.error calls and coverage-evidence passes. Both prior review threads are resolved. Re-request review to re-validate.

@opencode-agent opencode-agent Bot added area: ui-ux Frontend, interaction, design, or user experience priority: medium Normal-priority or P2 work status: needs-review Open pull request requiring current-head review or checks type: bug Defect or incorrect behavior labels Aug 22, 2026

@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 2 potential issues.

Open in Devin Review

Comment thread src/routes/+page.svelte
Comment thread src/routes/+page.svelte
@seonghobae
seonghobae marked this pull request as draft August 23, 2026 20:05
@seonghobae
seonghobae marked this pull request as ready for review August 24, 2026 07:15
@seonghobae

Copy link
Copy Markdown
Contributor Author

The bounded scan/navigation failure-feedback slice is ready for review at exact head 1d005586b270ca1fcad445970cf44bf5e7268425; no unresolved review threads remain. Protected checks/approvals are still required.

@seonghobae
seonghobae marked this pull request as draft August 24, 2026 07:25
@seonghobae
seonghobae marked this pull request as ready for review August 24, 2026 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui-ux Frontend, interaction, design, or user experience priority: medium Normal-priority or P2 work status: needs-review Open pull request requiring current-head review or checks type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant