relay-companion 0.1.96 → 0.1.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/overlay/inbox.html +8 -1
- package/overlay/main.cjs +22 -1
- package/package.json +1 -1
package/overlay/inbox.html
CHANGED
|
@@ -760,6 +760,10 @@
|
|
|
760
760
|
.sv-note { padding:10px 16px 0; font-size:11.5px; color:#1a7f37; line-height:1.4; }
|
|
761
761
|
.sv-version { padding:20px 16px 12px; font-family:var(--mono); font-size:10.5px; color:var(--muted-3); }
|
|
762
762
|
.sv-update { display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
|
|
763
|
+
/* The OS default browser is often NOT where the user's session lives, so the
|
|
764
|
+
setup URL is shown here to open wherever they are actually signed in. */
|
|
765
|
+
.sv-url { padding-top:2px; }
|
|
766
|
+
.sv-url-text { font-family:var(--mono); font-size:10px; color:var(--muted-2); user-select:text; overflow-wrap:anywhere; }
|
|
763
767
|
.sv-update-btn { width:auto; padding:7px 12px; border-radius:8px; font-family:var(--sans); font-size:12px; }
|
|
764
768
|
/* signed-out call-to-action on the Relays empty state — quiet filled pill (th-count language) */
|
|
765
769
|
.sv-signin-banner {
|
|
@@ -2172,6 +2176,7 @@
|
|
|
2172
2176
|
btn.addEventListener("click", () => {
|
|
2173
2177
|
expandedSentId = null;
|
|
2174
2178
|
openRelayFromUI(id, "sent", "current");
|
|
2179
|
+
renderSent(); // the menu must close on screen, not just in state
|
|
2175
2180
|
});
|
|
2176
2181
|
}
|
|
2177
2182
|
for (const btn of sentListEl.querySelectorAll("[data-sent-open-fresh]")) {
|
|
@@ -2179,6 +2184,7 @@
|
|
|
2179
2184
|
btn.addEventListener("click", () => {
|
|
2180
2185
|
expandedSentId = null;
|
|
2181
2186
|
openRelayFromUI(id, "sent", "fresh");
|
|
2187
|
+
renderSent(); // the menu must close on screen, not just in state
|
|
2182
2188
|
});
|
|
2183
2189
|
}
|
|
2184
2190
|
}
|
|
@@ -3261,7 +3267,8 @@
|
|
|
3261
3267
|
maxlength="16" placeholder="Pairing code" value="${esc(svDraft)}" ${svBusy ? "disabled" : ""} />
|
|
3262
3268
|
<button class="sv-connect" type="button" id="svConnect" ${svBusy ? "disabled" : ""}>${svBusy ? "Connecting…" : "Connect"}</button>
|
|
3263
3269
|
</div>
|
|
3264
|
-
<div class="sv-hint">Your browser opened the Relay setup page — paste the pairing code it shows.</div
|
|
3270
|
+
<div class="sv-hint">Your browser opened the Relay setup page — paste the pairing code it shows.</div>
|
|
3271
|
+
<div class="sv-hint sv-url" data-stop="1">Wrong browser? Open this there instead:<br><span class="sv-url-text" id="svSetupUrl">${esc((settingsInfo && settingsInfo.setupUrl) || "")}</span></div>`;
|
|
3265
3272
|
}
|
|
3266
3273
|
function renderSettings() {
|
|
3267
3274
|
if (activeView !== "settings") return;
|
package/overlay/main.cjs
CHANGED
|
@@ -455,7 +455,19 @@ function accountInfo() {
|
|
|
455
455
|
// not only in the tray menu.
|
|
456
456
|
updateAvailable: availableUpdate || "",
|
|
457
457
|
updating: updateInFlight,
|
|
458
|
-
|
|
458
|
+
// Route through the app's OWN sign-in, not Clerk's hosted accounts.<domain>
|
|
459
|
+
// subdomain. Clerk runs here in proxy mode (/__clerk), and the accounts./clerk.
|
|
460
|
+
// hosts present NO certificate — the handshake fails outright, so a signed-out
|
|
461
|
+
// user hitting /app/setup was bounced to a page no browser can load. /sign-in
|
|
462
|
+
// renders through the proxy and carries the user on to setup afterwards.
|
|
463
|
+
// switch=1 is what makes this a SWITCH rather than a sign-in: the browser
|
|
464
|
+
// that runs this almost always still holds the old session, and without the
|
|
465
|
+
// flag the page treats that session as success and returns the pairing code
|
|
466
|
+
// for the very account the user was trying to leave.
|
|
467
|
+
setupPath: SETUP_PATH,
|
|
468
|
+
// Shown in the pill so the flow is not trapped in whichever browser the OS
|
|
469
|
+
// considers default (the session usually lives in a different one).
|
|
470
|
+
setupUrl: absoluteUrl(SETUP_PATH),
|
|
459
471
|
};
|
|
460
472
|
}
|
|
461
473
|
|
|
@@ -548,6 +560,11 @@ async function signOutAccount() {
|
|
|
548
560
|
}
|
|
549
561
|
|
|
550
562
|
// Turn an actionUrl (absolute https, or a relative path) into an absolute URL.
|
|
563
|
+
// The one destination "Switch account" may use. Kept as a constant so the path
|
|
564
|
+
// and the copyable URL can never drift apart, and so the regression test has a
|
|
565
|
+
// single thing to assert against.
|
|
566
|
+
const SETUP_PATH = "/sign-in?switch=1&redirect_url=%2Fapp%2Fsetup";
|
|
567
|
+
|
|
551
568
|
function absoluteUrl(pathOrUrl) {
|
|
552
569
|
const value = String(pathOrUrl || "").trim();
|
|
553
570
|
if (!value) return webBase();
|
|
@@ -3161,6 +3178,10 @@ function quitRelayCompletely() {
|
|
|
3161
3178
|
let availableUpdate = null; // version string when newer than what we run
|
|
3162
3179
|
let updateInFlight = false;
|
|
3163
3180
|
async function checkForUpdate() {
|
|
3181
|
+
// A sandboxed harness must never consult the registry: whether an update
|
|
3182
|
+
// happens to be published mid-run would otherwise change the Settings card's
|
|
3183
|
+
// version line and make an assertion pass or fail on release timing.
|
|
3184
|
+
if (process.env.RELAY_OVERLAY_TEST === "1" || process.env.RELAY_OVERLAY_PERF === "1") return;
|
|
3164
3185
|
try {
|
|
3165
3186
|
const mod = await import(pathToFileURL(path.join(__dirname, "..", "src", "auto-update.js")).href);
|
|
3166
3187
|
const latest = await mod.fetchLatestVersion({});
|