Skip to content

fix(review): restore repository and launch error handling - #2837

Open
guantw wants to merge 5 commits into
GCWing:mainfrom
guantw:fix/reapply-pr2746-review
Open

fix(review): restore repository and launch error handling#2837
guantw wants to merge 5 commits into
GCWing:mainfrom
guantw:fix/reapply-pr2746-review

Conversation

@guantw

@guantw guantw commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve Git repository ownership failures as git_repository_untrusted and show localized, actionable errors in the Review platform panel. Automatic snapshot/context loads only display the error; explicit refresh and retry actions use the existing consent-based trust recovery flow.
  • Share action-start error presentation between the Review action header and notifications. Prefer existing structured launch message keys, retain the dialog-start prefix as a compatibility fallback, preserve backend reasons, and let multiline details wrap.
  • Distinguish missing local explicit file/directory targets from existing targets without workspace changes. Bind absolute paths to the workspace and use Git change evidence first so deleted files and rename source paths remain reviewable. Remote workspace Review keeps its existing unsupported result without probing paths or falling back to local inspection.

Related: #2746.

Type and Areas

Type: Regression fix.

Areas: Rust integration services, Core compatibility facade, desktop/Tauri commands, Web UI Review panels and launch flow, and en-US/zh-CN/zh-TW locales.

Motivation / Impact

Repository ownership failures otherwise surface as raw Git diagnostics, action-start errors can show inconsistent untranslated text across the header and notification, and nonexistent explicit targets lack useful feedback. The updated behavior makes these failures actionable while keeping trust prompts tied to explicit panel actions and preserving the current remote Review capability boundary.

Verification

  • Focused Web UI suite: 151 tests passed across 12 files using pnpm --dir src/web-ui exec vitest run with --maxWorkers=50%. Coverage includes Git trust recovery/presentation, Review platform linking and mounted-panel trust interactions, action-bar formatting/rendering/i18n/layout, launch errors, explicit-target resolution, ReviewService, and SystemAPI.
  • New interaction regressions cover automatic snapshot/context loads without trust prompts, explicit Retry approval/decline and bounded replay, identical header/notification errors, structured launch keys and legacy strings, local deletion/rename evidence, and remote exists/missing/offline cases with no path or Git probes.
  • pnpm run check:web: passed, including type checking, Canvas SDK, typography, Appearance, theme color, and visual contract checks.
  • pnpm run i18n:audit: passed with zero warnings.
  • Backend verification for the unchanged Rust changes in this PR:
    • cargo test --locked -p openbitfun-services-integrations --no-default-features --features review-platform --lib repository_trust: 4 passed.
    • cargo test --locked -p openbitfun-services-integrations --no-default-features --features review-platform --lib ordinary_git_failure_remains_an_invalid_repository_error: 1 passed.
    • cargo test --locked -p openbitfun-services-integrations --no-default-features --features git --lib git::trust::tests: 19 passed.
    • cargo check --locked -p openbitfun-core --no-default-features --features review-platform: passed.
    • Desktop test binary compiled and linked with cargo test --locked -p openbitfun-desktop --lib api::review_platform_api::tests. With the test-artifact workaround below, api::review_platform_api::tests passed 4 tests and path_probe_payloads_accept_optional_remote_scope passed 1 test.
    • pnpm run check:core-boundaries: passed.
  • git diff origin/main...HEAD --check: passed.

Reviewer Notes

  • No persisted shape or backend protocol changes. Existing string-only action errors remain readable; structured launch errors use the existing launch error contract. The shared Git trust helper retains its existing behavior for other callers.
  • Windows desktop tests required embedding Tauri's stock Common Controls v6 manifest into the generated test executable. Without it, the executable exits with STATUS_ENTRYPOINT_NOT_FOUND on this machine. This workaround affects only the test artifact and is not included in the PR. Existing matching sherpa-onnx 1.13.4 libraries were used for linking.
  • Mounted React interaction tests and mocked API/runtime tests were exercised locally. Remote workspace rejection was verified with mocks; live SSH, remote control, Peer Device Mode, and Detached Dispatch were not exercised. This PR does not add remote workspace Review support.
  • AI-assisted implementation with focused automated verification; no end-to-end application UI verification.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

Preserve repository ownership failures as a stable error code across Review platform commands and reuse the shared trust classifier.

Translate the code into actionable localized copy and route user-initiated retries through the existing trust recovery flow.

Cover trust classification and localized error handling with backend and frontend regression tests.
Translate dialog-turn start failures in the Review action bar while preserving specific backend reasons.

Allow multiline error details to wrap without truncation using the current theme tokens. Cover error classification, localization, component wiring, and layout behavior.
Resolve explicit file and directory scopes against the active local or remote workspace before starting Review.

Return localized missing-target feedback and forward the optional remote connection scope through the existing path-existence API.

Cover target resolution, service handling, and API forwarding with regression tests.
Restrict Review platform trust recovery to explicit refresh and retry actions. Share localized launch error presentation across action headers and notifications while retaining structured keys and backend reasons.

Keep unsupported remote Review targets free of path probes, preserve local missing-target and Git evidence handling, and cover the interaction boundaries with regression tests.
Use OpenBitFun in absolute workspace path fixtures so the target resolver tests comply with the product identity audit.
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