Skip to content

test(desktop): pin the About reader's missing-provider throw - #4905

Open
chihumyum wants to merge 1 commit into
apache:mainfrom
chihumyum:test/app-update-about-reader-throw
Open

test(desktop): pin the About reader's missing-provider throw#4905
chihumyum wants to merge 1 commit into
apache:mainfrom
chihumyum:test/app-update-about-reader-throw

Conversation

@chihumyum

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #4498, taking the two non-blocking P3s from the re-review; the commit carrying them was pushed after the merge, so it lands here.

  • AppUpdateAboutProjectionConsumer throws when mounted outside AppUpdateProvider, but app-update-provider-scope.test.ts covered only the mounted path. Add the assert.throws render case (React's act rethrows the uncaught render error) and assert the reader's callback never ran.
  • trim the AboutUpdateStatusRow doc comment to the sentence the next editor needs, that it is a component because the action guard is a hook; the ownership argument lives in refactor(desktop): move App Update controller below AppShell #4498's body.

Refs #4582

Verification

  • Node 24: desktop test:dist 2312/2312, @maka/desktop typecheck, lint, format:check
  • check:renderer-architecture --base upstream/main, check:app-shell-hooks, Astryx inventory, Knip (apps/desktop), ASF headers, git diff --check
  • the new case fails when the Consumer's throw is replaced by return null (checked locally before pushing)

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Claude Code wrote the test case and the comment trim and ran the verification; the human contributor reviewed the work and chose to submit it.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

`AppUpdateAboutProjectionConsumer` throws when mounted outside
`AppUpdateProvider`; the scope suite covered only the mounted path.
Add the `assert.throws` render case, and trim the `AboutUpdateStatusRow`
doc comment to the sentence the next editor needs (the ownership
argument now lives in the PR body).

@hqhq1025 hqhq1025 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No substantiated findings at 8269d2d. The new test mounts the actual AppUpdateAboutProjectionConsumer without its provider, verifies the missing-provider error and ensures the projection callback never runs (app-update-provider-scope.test.ts:260; app-update-projection-context.ts:34). The other change is comment-only.

The full build:test succeeds after applying the repository's required dependency patches, and all four provider-scope tests pass. A production-only load-hook mutation replacing the consumer's throw with a quiet return makes the new test fail with Missing expected exception, confirming it distinguishes the prohibited fallback. No full Desktop suite or live Electron UI run was performed. No blocker found within this test-focused scope; this is not an approval.

Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants