Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.12.13"
- run: pip install "mkdocs-material>=9.5,<10"
- run: mkdocs build --strict
- uses: actions/upload-pages-artifact@v3
Expand Down
36 changes: 18 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@
"@codemirror/language": "6.12.4",
"@codemirror/lint": "6.9.7",
"@codemirror/search": "6.7.1",
"@codemirror/state": "6.7.0",
"@codemirror/view": "6.43.4",
"@codemirror/state": "6.7.1",
"@codemirror/view": "6.43.6",
"@fortawesome/fontawesome-svg-core": "7.3.0",
"@fortawesome/free-solid-svg-icons": "7.3.0",
"@modelcontextprotocol/sdk": "1.29.0",
"electron-store": "11.0.2",
"electron-updater": "6.8.9",
"fast-xml-parser": "5.9.3",
"image-q": "4.0.0",
"js-yaml": "5.2.0",
"js-yaml": "5.2.1",
"mdast-util-from-markdown": "2.0.3",
"mdast-util-to-hast": "13.2.1",
"pngjs": "7.0.0",
Expand All @@ -82,7 +82,7 @@
"@types/react-dom": "19.2.3",
"@vitejs/plugin-react": "5.2.0",
"cross-env": "10.1.0",
"electron": "42.5.2",
"electron": "42.7.0",
"electron-builder": "26.15.3",
"electron-vite": "5.0.0",
"eslint": "9.39.4",
Expand Down
42 changes: 1 addition & 41 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"rangeStrategy": "pin",
"schedule": [
"before 6am on monday"
],
"platformAutomerge": false,
"packageRules": [
{
"description": "Automerge non-major updates after the verify gate passes. platformAutomerge is off so Renovate waits for the ci.yml check itself, since main has no required status checks. Majors are left for manual review.",
"matchUpdateTypes": [
"minor",
"patch",
"pin",
"digest"
],
"automerge": true
},
{
"description": "Keep @types/node on the major that matches the CI Node runtime (24). Bump this alongside the node-version in the workflows.",
"matchPackageNames": [
"@types/node"
],
"allowedVersions": "<25"
},
{
"description": "Keep Vite on the v7 line until electron-vite supports v8.",
"matchPackageNames": [
"vite"
],
"allowedVersions": "<8"
},
{
"description": "Keep plugin-react on v5 while Vite 8 is blocked.",
"matchPackageNames": [
"@vitejs/plugin-react"
],
"allowedVersions": "<6"
}
]
"enabled": false
}
7 changes: 5 additions & 2 deletions src/main/ipc/handlers/updates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type { UpdateInfo } from 'electron-updater'
import type { IpcContext } from '../types'
import type { UpdateCheckResult } from '../../../shared/updates'
import type { IpcResult } from '../../../shared/types'
import { logError } from '../../utils/errorReporting'

let configured = false
function configure(context: IpcContext): void {
Expand Down Expand Up @@ -62,7 +63,8 @@ export function checkForUpdates(context: IpcContext): Promise<UpdateCheckResult>
notes: releaseNotesText(info.releaseNotes),
})
const onNotAvailable = (): void => finish({ status: 'up-to-date', version: app.getVersion() })
const onError = (err: Error): void => finish({ status: 'error', error: err.message })
// The dialog shows a friendly message; keep the raw HTTP-layer error in the log for support.
const onError = (err: Error): void => { logError('updates:check', err); finish({ status: 'error', error: err.message }) }

autoUpdater.once('update-available', onAvailable)
autoUpdater.once('update-not-available', onNotAvailable)
Expand All @@ -73,7 +75,7 @@ export function checkForUpdates(context: IpcContext): Promise<UpdateCheckResult>
// finish() is idempotent (resolve is a no-op after the first call).
autoUpdater.checkForUpdates()
.then(result => { if (!result) finish({ status: 'up-to-date', version: app.getVersion() }) })
.catch((err: unknown) => finish({ status: 'error', error: err instanceof Error ? err.message : String(err) }))
.catch((err: unknown) => { logError('updates:check', err); finish({ status: 'error', error: err instanceof Error ? err.message : String(err) }) })
})
}

Expand All @@ -88,6 +90,7 @@ export function registerUpdatesHandlers(context: IpcContext): void {
await autoUpdater.downloadUpdate()
return { ok: true }
} catch (err) {
logError('updates:download', err)
return { ok: false, error: err instanceof Error ? err.message : String(err) }
}
})
Expand Down
57 changes: 5 additions & 52 deletions src/renderer/components/updatesDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@ const DIALOG_CLOSE_BTN: CSSProperties = {
const MESSAGE_STYLE: CSSProperties = {
margin: 0,
color: 'var(--rokdock-text-primary)',
fontSize: 'var(--rokdock-font-base)',
fontSize: 'var(--rokdock-font-xs)',
lineHeight: 1.45,
}

const SUBTLE_STYLE: CSSProperties = {
margin: 0,
color: 'var(--rokdock-text-dim)',
fontSize: 'var(--rokdock-font-sm)',
fontFamily: 'var(--rokdock-font-mono)',
fontSize: 'var(--rokdock-font-xs)',
}

const NOTES_STYLE: CSSProperties = {
Expand All @@ -48,7 +47,7 @@ const NOTES_STYLE: CSSProperties = {
overflowY: 'auto',
whiteSpace: 'pre-wrap',
color: 'var(--rokdock-text-dim)',
fontSize: 'var(--rokdock-font-sm)',
fontSize: 'var(--rokdock-font-xs)',
lineHeight: 1.45,
}

Expand All @@ -60,42 +59,6 @@ const PROGRESS_TRACK_STYLE: CSSProperties = {
overflow: 'hidden',
}

const DETAILS_TOGGLE_STYLE: CSSProperties = {
alignSelf: 'flex-start',
padding: 0,
border: 'none',
background: 'transparent',
color: 'var(--rokdock-text-dim)',
fontSize: 'var(--rokdock-font-sm)',
textDecoration: 'underline',
cursor: 'pointer',
}

const DETAILS_BOX_STYLE: CSSProperties = {
margin: 0,
maxHeight: 160,
overflowY: 'auto',
whiteSpace: 'pre-wrap',
wordBreak: 'break-word',
color: 'var(--rokdock-text-dim)',
fontSize: 'var(--rokdock-font-sm)',
fontFamily: 'var(--rokdock-font-mono)',
}

/** Raw update-check/download errors can be long HTTP-layer dumps; hide them
* behind a toggle instead of always showing them under the friendly message. */
function ErrorDetails({ error }: { error: string }) {
const [open, setOpen] = useState(false)
return (
<>
<button style={DETAILS_TOGGLE_STYLE} onClick={() => setOpen(prev => !prev)}>
{open ? 'Hide details' : 'Show details'}
</button>
{open && <p style={DETAILS_BOX_STYLE}>{error}</p>}
</>
)
}

export default function UpdatesDialog({ result, onClose, onRetry }: {
result: UpdateCheckResult | null
onClose: () => void
Expand Down Expand Up @@ -141,12 +104,7 @@ export default function UpdatesDialog({ result, onClose, onRetry }: {
)
actions = <button className="rokdock-btn rokdock-btn-ghost" disabled>Downloading...</button>
} else if (downloadError) {
body = (
<>
<p style={MESSAGE_STYLE}>The update could not be downloaded.</p>
<ErrorDetails error={downloadError} />
</>
)
body = <p style={MESSAGE_STYLE}>The update could not be downloaded. Please try again later.</p>
actions = (
<>
<button className="rokdock-btn rokdock-btn-ghost" onClick={onClose}>Close</button>
Expand All @@ -171,12 +129,7 @@ export default function UpdatesDialog({ result, onClose, onRetry }: {
</>
)
} else if (result.status === 'error') {
body = (
<>
<p style={MESSAGE_STYLE}>Could not check for updates.</p>
{result.error && <ErrorDetails error={result.error} />}
</>
)
body = <p style={MESSAGE_STYLE}>Could not check for updates. Please try again later.</p>
actions = (
<>
<button className="rokdock-btn rokdock-btn-ghost" onClick={onClose}>Close</button>
Expand Down