diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9dc31b9..c724b0d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 diff --git a/package-lock.json b/package-lock.json index 4a5e78d..4fea4cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rokdock", - "version": "1.5.1", + "version": "1.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rokdock", - "version": "1.5.1", + "version": "1.6.0", "license": "Apache-2.0", "dependencies": { "@codemirror/commands": "6.10.4", @@ -14,8 +14,8 @@ "@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", @@ -23,7 +23,7 @@ "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", @@ -45,7 +45,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", @@ -578,18 +578,18 @@ } }, "node_modules/@codemirror/state": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.7.0.tgz", - "integrity": "sha512-Zbl9NyscLMZkfXPQnNAIIAFftidrA1UbcJEIMp24C0Bukc2I5T8wJS0wsXYsnDOqCFJUeJ1BITGNs5CqPDSmSg==", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.7.1.tgz", + "integrity": "sha512-9QzNDgE4EYDnAHfrTlR2lwiPciiOymLtwKK+8yHQzCc7GXhAP9xdEbEJFy2IWB1j9UGUl9BsgMmTo/ImA02T7A==", "license": "MIT", "dependencies": { "@marijn/find-cluster-break": "^1.0.0" } }, "node_modules/@codemirror/view": { - "version": "6.43.4", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.4.tgz", - "integrity": "sha512-YImu23iyKfncJzT7sRy+rEqEhSc8RhOHqDxwy4WzXRKJwYm6iwf/9OJk5ctCAdZ6yi2ZqaGEvmf55fSVqMDrgg==", + "version": "6.43.6", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.6.tgz", + "integrity": "sha512-EVunGSYN1wz1p75WY1s3Xg7t3i8Yol0kGZGizNdX9BUFgMFILYVe8/u6EVpo7Ff5PwbZuILb4QAq7IZoKzIEQA==", "license": "MIT", "dependencies": { "@codemirror/state": "^6.7.0", @@ -4943,9 +4943,9 @@ } }, "node_modules/electron": { - "version": "42.5.2", - "resolved": "https://registry.npmjs.org/electron/-/electron-42.5.2.tgz", - "integrity": "sha512-nEoyciv2iC6gTvCbkQ3eP5tjAOo28wfm0adZaMYTns92MyODHeD1TlrGt4E35d4tJfDlmv+BHOuz0QIkJ63c6w==", + "version": "42.7.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-42.7.0.tgz", + "integrity": "sha512-Uu5p03M5o7aqulT8QxFYYg3eJVDfuNEUuasBU1qFl05ghVRRH7UHL7na8S3GhxVScZQ2D7j9DCMsc+qT5FuxtQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6992,9 +6992,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.2.0.tgz", - "integrity": "sha512-YeLUMlvR4Ou1B119LIaM0r65JvbOBooJDc9yEu0dClb/uSC5P4FrLU8OCCz/HXWvtPoIrR0dRzABTjo1sTN9Bw==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.2.1.tgz", + "integrity": "sha512-zfLtNfQqxVqq3uaTqSkh4x4hZw3KHobGUA0fJUj4wawW8bsQLTVqpHdXSIzidh7o+4lEW36tANuAGdaFx6Zgnw==", "funding": [ { "type": "github", diff --git a/package.json b/package.json index 541e1ca..0c94507 100644 --- a/package.json +++ b/package.json @@ -51,8 +51,8 @@ "@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", @@ -60,7 +60,7 @@ "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", @@ -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", diff --git a/renovate.json b/renovate.json index a7fd32e..6132aec 100644 --- a/renovate.json +++ b/renovate.json @@ -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 } diff --git a/src/main/ipc/handlers/updates.ts b/src/main/ipc/handlers/updates.ts index 4509902..a7ad6f7 100644 --- a/src/main/ipc/handlers/updates.ts +++ b/src/main/ipc/handlers/updates.ts @@ -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 { @@ -62,7 +63,8 @@ export function checkForUpdates(context: IpcContext): Promise 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) @@ -73,7 +75,7 @@ export function checkForUpdates(context: IpcContext): Promise // 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) }) }) }) } @@ -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) } } }) diff --git a/src/renderer/components/updatesDialog.tsx b/src/renderer/components/updatesDialog.tsx index 51118e3..3c45220 100644 --- a/src/renderer/components/updatesDialog.tsx +++ b/src/renderer/components/updatesDialog.tsx @@ -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 = { @@ -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, } @@ -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 ( - <> - - {open &&

{error}

} - - ) -} - export default function UpdatesDialog({ result, onClose, onRetry }: { result: UpdateCheckResult | null onClose: () => void @@ -141,12 +104,7 @@ export default function UpdatesDialog({ result, onClose, onRetry }: { ) actions = } else if (downloadError) { - body = ( - <> -

The update could not be downloaded.

- - - ) + body =

The update could not be downloaded. Please try again later.

actions = ( <> @@ -171,12 +129,7 @@ export default function UpdatesDialog({ result, onClose, onRetry }: { ) } else if (result.status === 'error') { - body = ( - <> -

Could not check for updates.

- {result.error && } - - ) + body =

Could not check for updates. Please try again later.

actions = ( <>