Skip to content

remove electron deps from about.tsx#3194

Merged
sawka merged 1 commit intomainfrom
sawka/about-no-electron
Apr 7, 2026
Merged

remove electron deps from about.tsx#3194
sawka merged 1 commit intomainfrom
sawka/about-no-electron

Conversation

@sawka
Copy link
Copy Markdown
Member

@sawka sawka commented Apr 7, 2026

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

Walkthrough

The changes extend the configuration system to expose version and buildtime information across the application stack. The Go backend adds Version and BuildTime fields to the FullConfigType struct, populating them from wavebase constants. The TypeScript type definitions are updated to include these new string fields. The React frontend refactors the AboutModal component to derive version and updater channel information from Jotai atoms reading the full configuration, replacing previous synchronous API calls.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided, but the title and code changes are sufficiently clear about the refactoring intent. Consider adding a brief description explaining why electron dependencies were removed and how Jotai replaces the previous API calls.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: replacing electron/API dependencies in AboutModal with Jotai state management reads.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 sawka/about-no-electron

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 and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying waveterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 83c3191
Status: ✅  Deploy successful!
Preview URL: https://e1100c04.waveterm.pages.dev
Branch Preview URL: https://sawka-about-no-electron.waveterm.pages.dev

View logs

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@frontend/app/modals/about.tsx`:
- Around line 89-90: The versionString currently interpolates fullConfig fields
directly and can render awkward partial text before fullConfig (from
fullConfigAtom) hydrates; update the logic that builds versionString to detect
pre-hydration (fullConfig == null or missing version/buildtime) and return a
clear fallback like "Unknown version" or "Loading…" instead of composing empty
pieces; target the versionString construction in about.tsx (where versionString
and isDev() are used) and ensure you check fullConfig and fullConfig.settings
presence (and fall back updaterChannel similarly) before interpolating.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9faa80e4-490d-4129-841a-414d683162a0

📥 Commits

Reviewing files that changed from the base of the PR and between 28bab88 and 83c3191.

📒 Files selected for processing (3)
  • frontend/app/modals/about.tsx
  • frontend/types/gotypes.d.ts
  • pkg/wconfig/settingsconfig.go

Comment on lines +89 to +90
const versionString = `${fullConfig?.version ?? ""} (${isDev() ? "dev-" : ""}${fullConfig?.buildtime ?? ""})`;
const updaterChannel = fullConfig?.settings?.["autoupdate:channel"] ?? "latest";
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.

⚠️ Potential issue | 🟡 Minor

Guard against blank/partial version text before config hydration.

Because fullConfigAtom starts as null, this can briefly render an awkward version string. Add an explicit fallback string for pre-hydration state.

💡 Suggested adjustment
-    const versionString = `${fullConfig?.version ?? ""} (${isDev() ? "dev-" : ""}${fullConfig?.buildtime ?? ""})`;
+    const versionString =
+        fullConfig?.version != null && fullConfig?.buildtime != null
+            ? `${fullConfig.version} (${isDev() ? "dev-" : ""}${fullConfig.buildtime})`
+            : "loading...";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const versionString = `${fullConfig?.version ?? ""} (${isDev() ? "dev-" : ""}${fullConfig?.buildtime ?? ""})`;
const updaterChannel = fullConfig?.settings?.["autoupdate:channel"] ?? "latest";
const versionString =
fullConfig?.version != null && fullConfig?.buildtime != null
? `${fullConfig.version} (${isDev() ? "dev-" : ""}${fullConfig.buildtime})`
: "loading...";
const updaterChannel = fullConfig?.settings?.["autoupdate:channel"] ?? "latest";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/app/modals/about.tsx` around lines 89 - 90, The versionString
currently interpolates fullConfig fields directly and can render awkward partial
text before fullConfig (from fullConfigAtom) hydrates; update the logic that
builds versionString to detect pre-hydration (fullConfig == null or missing
version/buildtime) and return a clear fallback like "Unknown version" or
"Loading…" instead of composing empty pieces; target the versionString
construction in about.tsx (where versionString and isDev() are used) and ensure
you check fullConfig and fullConfig.settings presence (and fall back
updaterChannel similarly) before interpolating.

@sawka sawka merged commit 9f41b57 into main Apr 7, 2026
9 checks passed
@sawka sawka deleted the sawka/about-no-electron branch April 7, 2026 17:04
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