fix: harden updater null-handling, dev-mock install_info, honest interests copy

- useUpdater: guard the install_info response — a null/garbage value no
  longer overwrites the optimistic default and crash the whole app on
  installInfo.can_self_update. (Real app never returns null here; this is
  defensive — a failed updater check must not take down Vega.)
- tauri-dev-mock: add an install_info case so browser dev mode
  (localhost:1420) doesn't crash on the post-onboarding render.
- onboarding: the interests step claimed "you can always change this
  later" — there is no interests editor anywhere. Copy is now honest
  about what interests do (surface as hashtag pills on an empty
  Following feed).
This commit is contained in:
Jure
2026-05-22 14:59:57 +02:00
parent 2dfe0e86c1
commit 1c73f1e320
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ function InterestsStep({ onComplete }: { onComplete: () => void }) {
return (
<Shell step={2} totalSteps={3}>
<Heading>What are you into?</Heading>
<Body>Pick a few topics to get your feed started. You can always change this later.</Body>
<Body>Pick a few topics we'll suggest them as hashtags to explore.</Body>
<div className="grid grid-cols-3 gap-2 mb-7">
{INTEREST_TOPICS.map(({ emoji, label, tag }) => {
+3 -1
View File
@@ -32,7 +32,9 @@ export function useUpdater(): UpdateState {
useEffect(() => {
invoke<InstallInfo>("install_info")
.then(setInstallInfo)
// Guard: a null/garbage response must not blow away the optimistic
// default — installInfo is dereferenced unconditionally in the return.
.then((info) => { if (info) setInstallInfo(info); })
.catch(() => { /* keep optimistic default */ });
}, []);
+3
View File
@@ -29,6 +29,9 @@ if (import.meta.env.DEV && !(window as any).__TAURI_INTERNALS__) {
return [];
case "db_load_profile":
return null;
case "install_info":
// Browser dev mode has no real install — mirror useUpdater's default.
return { can_self_update: true, kind: "updater" };
default:
console.warn("[tauri-dev-mock] unhandled invoke:", cmd, args);
return null;