Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,13 @@ describe('AppUpdateProvider render scope', () => {
});
await act(async () => root.unmount());
});

test('throws for an About reader mounted outside AppUpdateProvider', () => {
const { root } = installReactRenderer();
assert.throws(
() => act(() => root.render(createElement(AboutProbe))),
{ message: 'AppUpdateProvider is missing' },
);
assert.equal(aboutRenders, 0);
});
});
8 changes: 2 additions & 6 deletions apps/desktop/src/renderer/settings/about-settings-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,8 @@ const linkInRowEnd = { paddingInline: 'var(--spacing-3)' } as const;
type AboutCopy = ReturnType<typeof getSettingsPreferencesCopy>['about'];

/**
* The updater's row, rendered only for a packaged install. Update state is not
* this page's to own: the App Update feature holds the renderer's sole updater
* subscription above AppShell and publishes About's projection, so the row
* reads status from the consumer and issues the feature's guarded check
* instead of touching the bridge. A component rather than the consumer's
* render callback because the action guard is a hook.
* About's update row for a packaged install. A component rather than the
* consumer's render callback because the action guard is a hook.
*/
function AboutUpdateStatusRow(props: {
readonly update: AppUpdateAboutProjection;
Expand Down