Fix stale PWA service worker after updates; collapsible task list; short screens
Installed apps checked their service worker at /sw-<old build>.js. That file no longer exists after an update and the static fallback answered with index.html, so the update check failed and the old worker kept serving the previous app shell. The old frontend crashed on the new image references (base64Size of a missing `data`), leaving a blank page on phones. Old service worker URLs now get the clean-up worker (/sw.js), which unregisters and reloads; missing scripts and styles answer 404 instead of HTML. - Task list above the composer folds to one line (progress, current task), remembered per device. - max-height: 560px layout (square phones such as the Clicks Communicator, landscape): tighter top bar, composer and new-chat wizard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b1fa54a7b6
commit
d7f89ee257
6 files changed
+232
-8
No files matched your search
@@ -25,3 +25,21 @@ export function useReasoningMode(): ReasoningMode {
|
||||
getReasoningMode,
|
||||
);
|
||||
}
|
||||
|
||||
const TODOS_KEY = "codecraft.todosCollapsed";
|
||||
|
||||
/** Task list above the composer folded to a one-line summary (per device). */
|
||||
export function useTodosCollapsed(): [boolean, (v: boolean) => void] {
|
||||
const v = useSyncExternalStore(
|
||||
(l) => {
|
||||
listeners.add(l);
|
||||
return () => listeners.delete(l);
|
||||
},
|
||||
() => localStorage.getItem(TODOS_KEY) === "1",
|
||||
);
|
||||
const set = (c: boolean) => {
|
||||
localStorage.setItem(TODOS_KEY, c ? "1" : "0");
|
||||
listeners.forEach((l) => l());
|
||||
};
|
||||
return [v, set];
|
||||
}
|
||||
Reference in new issue
Block a user