fix: display app version in More menu#97
fix: display app version in More menu#97Bortlesboat wants to merge 1 commit intowebadderall:mainfrom
Conversation
Add IPC handler to expose app.getVersion() to the renderer and display it in the More dropdown menu. Users can now verify which version they're running. Fixes webadderall#70 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning
|
| Cohort / File(s) | Summary |
|---|---|
Electron IPC Bridge electron/electron-env.d.ts, electron/ipc/handlers.ts, electron/preload.ts |
Added IPC infrastructure to retrieve app version: type definition for getAppVersion method, main process handler app:getVersion, and preload bridge exposing it to renderer. |
Version Display UI src/components/launch/LaunchWindow.tsx |
Added appVersion state with useEffect hook to fetch version on mount and conditional rendering of version label (v{appVersion}) in the "more" dropdown. |
Sequence Diagram(s)
sequenceDiagram
participant Renderer as React Component<br/>(LaunchWindow)
participant Preload as Preload Bridge<br/>(electronAPI)
participant Main as Main Process<br/>(IPC Handler)
participant App as Electron App
Renderer->>Renderer: useEffect on mount
Renderer->>Preload: window.electronAPI.getAppVersion()
Preload->>Main: ipcRenderer.invoke('app:getVersion')
Main->>App: app.getVersion()
App-->>Main: version string
Main-->>Preload: return version
Preload-->>Renderer: Promise<version>
Renderer->>Renderer: setState(appVersion)
Renderer->>Renderer: render version label
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
🐰✨ A version flows through pipes so neat,
From main to render,app.getVersion()complete!
The dropdown now shows what was true all along,
A humble v-number, but oh-so-strong!
Hops excitedly 🥕
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title clearly and specifically describes the main change: displaying the app version in the More menu. |
| Description check | ✅ Passed | The description is largely complete with summary, test plan, and linked issue, though it lacks a few template sections. |
| Linked Issues check | ✅ Passed | The PR successfully implements dynamic version retrieval via IPC to display the current app version, directly addressing issue #70's requirement. |
| Out of Scope Changes check | ✅ Passed | All changes are directly related to displaying the app version dynamically through IPC handlers and UI updates. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Comment @coderabbitai help to get the list of available commands and usage tips.
|
Could you attach a screenshot of what this looks like? |
|
Also, PR is not updated against main |
Summary
app:getVersionIPC handler inelectron/ipc/handlers.tsto exposeapp.getVersion()to the renderer processgetAppVersionin the preload bridge and add its type definitionTest plan
versionfield inpackage.jsonFixes #70
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes