feat: follow any open issue from search (Closes #1303)
CI / lint (pull_request) Successful in 3m54s
CI / build-release (pull_request) Successful in 7s
CI / browser-journey (pull_request) Successful in 5m37s
CI / release-candidate (pull_request) Has been skipped

This commit is contained in:
timmy committed 2026-08-23 11:02:33 +00:00
1 parent 0a18d1ac0f
commit 29e3f55e07
18 files changed
+88 -34

No files matched your search

+2 -2
View File
@@ -36,7 +36,7 @@
'/subscription?kind=' + encodeURIComponent(item.kind);
root.searchPreviewSubscriptionOptions = fetchJson => ({
load:async detail => {
if (!(detail.kind === 'issue' && detail.state === 'open' && detail.claimable)) return detail;
if (!(detail.kind === 'issue' && detail.state === 'open')) return detail;
const result = await fetchJson(root.searchPreviewSubscriptionPath(detail), {headers:{Accept:'application/json'}});
return {...detail, watching:result.watching === true};
},
@@ -52,7 +52,7 @@
'watch-error':(state.error?.message || 'Watch status was not changed.') + ' Retry.',
})[state.status] || '';
root.renderSearchPreviewWatch = (detail, state, button) => {
button.hidden = !(detail.kind === 'issue' && detail.state === 'open' && detail.claimable);
button.hidden = !(detail.kind === 'issue' && detail.state === 'open');
button.textContent = detail.watching ? 'Stop watching' : 'Watch issue';
button.disabled = state.status === 'watching' || state.status === 'unwatching';
};
+1 -1
View File
@@ -1,7 +1,7 @@
const BASE = new URL('./', self.location.href).pathname;
importScripts(BASE + 'static/private-data-registry.js');
importScripts(BASE + 'static/background-issue-sync.js');
const CACHE = 'stackchain-dashboard-shell-v132';
const CACHE = 'stackchain-dashboard-shell-v133';
const OFFLINE_LEASE_URL = new URL(BASE + '__offline-session-lease', self.location.origin).href;
const OUTAGE_STATUSES = new Set([500, 502, 503, 504]);
const NAVIGATION_TIMEOUT_MS = self.__STACKCHAIN_NAVIGATION_TIMEOUT_MS || 4000;