From de1a5e18d4c7c1a7852bc41f64cd91e7726a54f5 Mon Sep 17 00:00:00 2001 From: Local Dev Date: Tue, 27 Oct 2026 21:50:06 +0200 Subject: [PATCH] Theseus 0.3.124: Open-with label trimmed; file assocs auto-on; Settings sidebar gets System (holds Names & Certificates) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Open-with menu label — Windows was showing the per-extension ProgID's default value, which was set to "Theseus HTML Document". That looked verbose next to the real brand name, and the per-ext label never changed regardless of which extension the user right-clicked. Shortened to just "Theseus Navigator". The ApplicationDescription under Capabilities is dropped too — Default Apps uses it as a tooltip and the sentence it held was noise. File associations are now auto-registered on first launch. The toggle in Settings is dropped: the entries live under HKCU with no admin, cause no harm by being present, and the common case (right-click an .html on your desktop, see Theseus in the Open-with menu) is strictly better than the previous "toggle it on first" step. Two per-profile flags remember the rollout (fileAssocsAutoApplied) and the one-time 0.3.124 label rewrite (fileAssocsLabelFixed_1); a user who removes the entries by hand stays opted out. Settings sidebar — the Plug-ins nav entry is renamed System and now holds a chevron to Names & Certificates (which is no longer a separate top- level nav entry). The underlying section id stays "plugins" so the plugins-ariadne / plugins-aegis crumbs and any existing deep links keep working. Names & Certificates picks up a System › crumb at the top. --- main.js | 36 ++++++++++++++++++++++++++++++++++-- package.json | 2 +- settings.html | 33 ++++++++++++--------------------- 3 files changed, 47 insertions(+), 24 deletions(-) diff --git a/main.js b/main.js index 9e4740da..0143334a 100644 --- a/main.js +++ b/main.js @@ -12329,7 +12329,12 @@ async function setFileAssociations(on) { const classes = `HKCU\\Software\\Classes`; const caps = `HKCU\\Software\\Theseus Navigator\\Capabilities`; if (on) { - await regAdd(`${classes}\\${WIN_PROGID}`, "", "Theseus HTML Document"); + // The ProgID's default value is the friendly name Windows shows in the + // Open-with menu AND in the file-type column of Explorer. Keep it short + // — "Theseus Navigator" — not a long "Theseus HTML Document" per + // extension. ApplicationDescription under Capabilities is also dropped; + // Default Apps picks it up as a tooltip and the long sentence was noisy. + await regAdd(`${classes}\\${WIN_PROGID}`, "", "Theseus Navigator"); await regAdd(`${classes}\\${WIN_PROGID}\\DefaultIcon`, "", `${exe},0`); await regAdd(`${classes}\\${WIN_PROGID}\\shell\\open\\command`, "", openCmd); for (const ext of FILE_ASSOC_EXTS) { @@ -12339,7 +12344,6 @@ async function setFileAssociations(on) { // Windows Settings → Default Apps for each listed extension. await regAdd(caps, "ApplicationName", "Theseus Navigator"); await regAdd(caps, "ApplicationIcon", `${exe},0`); - await regAdd(caps, "ApplicationDescription", "A browser that follows the thread."); for (const ext of FILE_ASSOC_EXTS) await regAdd(`${caps}\\FileAssociations`, ext, WIN_PROGID); for (const p of DEFAULT_BROWSER_PROTOS) await regAdd(`${caps}\\URLAssociations`, p, WIN_PROGID); await regAdd(`HKCU\\Software\\RegisteredApplications`, "Theseus Navigator", "Software\\Theseus Navigator\\Capabilities"); @@ -12376,6 +12380,30 @@ ipcMain.handle("default-browser-state", () => ({ })); ipcMain.handle("default-browser-set", (_e, on) => setAsDefaultBrowser(!!on)); ipcMain.handle("file-assocs-set", (_e, on) => setFileAssociations(!!on)); +// Auto-register the HKCU "Open with Theseus" entries on first launch so +// double-clicking an .html / .pdf / .svg / .xhtml file (or picking it from +// an Open-with menu) just works, with no toggle to flip in Settings. Two +// per-profile flags: +// fileAssocsAutoApplied — first-run rollout. Once set, never auto-apply +// again, so a user who removes the association +// by hand (registry or Default Apps) stays opted +// out across restarts. +// fileAssocsLabelFixed_1 — one-time re-write for 0.3.124+: the old progid +// default was "Theseus HTML Document" which looked +// verbose next to the per-extension entry in the +// Open-with menu. Rewriting it to "Theseus +// Navigator" is idempotent and only fires once. +function autoApplyFileAssociations() { + if (process.platform !== "win32") return; + const needFirstRun = !settings.fileAssocsAutoApplied; + const needLabelFix = settings.fileAssocsAutoApplied && !settings.fileAssocsLabelFixed_1 && hasFileAssociations(); + if (!needFirstRun && !needLabelFix) return; + setFileAssociations(true).then(() => { + if (needFirstRun) settings.fileAssocsAutoApplied = true; + settings.fileAssocsLabelFixed_1 = true; + try { saveSettings(); } catch {} + }).catch((e) => console.warn("auto file assocs:", e?.message)); +} ipcMain.handle("open-system-defaults", () => openSystemDefaultApps()); if (!process.env.THESEUS_NO_AUTOSTART && !app.requestSingleInstanceLock()) { // Another Theseus owns this profile; it got our argv via second-instance. @@ -12455,6 +12483,10 @@ if (!process.env.THESEUS_NO_AUTOSTART && !app.requestSingleInstanceLock()) { // "restart to apply" chip instead of finding out in Settings. // boot-time poll now runs from onChromeReady; interval poll (4 h) is fine here. setInterval(() => pollAddonUpdates("interval"), 4 * 60 * 60 * 1000); + // Register the Windows Open-with entries on first run — no toggle, no + // UAC, no user step. Deferred past the toolbar paint so the one-shot + // reg.exe fan-out never gets in the way of launch. + setTimeout(() => { try { autoApplyFileAssociations(); } catch {} }, 5_000); // Launched from an installed app's shortcut: just that app's window; the // browser window comes up on the next plain launch (second-instance). const appUrl = webapps.appUrlFromArgv(process.argv); diff --git a/package.json b/package.json index 43458281..45f2b706 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "theseus-navigator", - "version": "0.3.123", + "version": "0.3.124", "license": "MPL-2.0", "description": "Theseus Navigator — a browser that follows the thread. By Silent Mode, a Deviant project.", "author": "Silent Mode", diff --git a/settings.html b/settings.html index 59973ff3..922b87fd 100644 --- a/settings.html +++ b/settings.html @@ -319,8 +319,7 @@ Passwords Performance Privacy - Names & Certificates - Plug-ins + System Ariadne's Thread Aegis Extensions @@ -342,13 +341,6 @@ -
@@ -494,6 +486,7 @@ these toggles, no further UI churn. Each row's "Not wired yet" caption goes away as its adapter lights up. --> +