Skip to content

feat: add host-aware PWA support - #150

Merged
comfuture merged 3 commits into
mainfrom
feat/issue-149-pwa-active-turn-wake-lock
Aug 12, 2026
Merged

feat: add host-aware PWA support#150
comfuture merged 3 commits into
mainfrom
feat/issue-149-pwa-active-turn-wake-lock

Conversation

@comfuture

@comfuture comfuture commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • generate and register a production Workbox service worker at /sw.js
  • serve a dynamic web app manifest whose installed name distinguishes each host as Codori @ <hostname-or-ip>
  • add maskable 192 px and 512 px Codori icons and reuse the icon in the dashboard sidebar header
  • require sw.js in the packaged server bundle and verify static service-worker delivery
  • keep the screen awake with VueUse while any normal Codex turn is submitted or streaming
  • preserve the existing realtime voice wake-lock implementation unchanged
  • ship the PWA Nuxt module with the published client and coalesce pending wake-lock transitions

Why

Codori can run on several hosts, and users may install more than one of them on the same phone or desktop. A static PWA name would make those installations indistinguishable. The server-owned manifest derives a safe label from the current request hostname or IP while sharing one build artifact.

Long-running normal turns can also outlive a mobile screen timeout. The new app-level coordinator holds one best-effort screen wake lock across all active normal project and projectless-chat sessions, without changing realtime voice ownership.

Commit structure

  • 1d16ec8 — host-aware PWA, packaged /sw.js, icons, and sidebar branding
  • 4df7cbd — normal active-turn wake-lock lifecycle and tests
  • 6c62b10 — published PWA dependency and pending wake-lock request coalescing

Validation

  • pnpm install --frozen-lockfile
  • pnpm --filter @codori/client lint
  • pnpm --filter @codori/client typecheck
  • pnpm --filter @codori/client test — 84 files, 559 tests passed
  • pnpm --filter @codori/client build — generated sw.js, Workbox, and 357 precache entries
  • pnpm --filter @codori/client pack --dry-run — published package includes the exported Nuxt configuration
  • pnpm --filter @codori/server lint
  • pnpm --filter @codori/server typecheck
  • pnpm --filter @codori/server test — 20 files, 262 tests passed
  • pnpm --filter @codori/server build
  • live packaged-server smoke: /sw.js, hostname/IP manifests, and icons returned the expected content types and values
  • in-app browser smoke: manifest link, theme color, and new sidebar icon rendered with no console warnings or errors

Known limits

  • screen wake lock remains best effort and does not provide native background execution after a manual device lock or browser suspension
  • PWA support covers the dashboard app, not the separate /xr/ bundle
  • dynamic API, RPC, WebSocket, attachment, and workspace-file responses are not runtime-cached

Closes #149

@comfuture
comfuture marked this pull request as ready for review August 12, 2026 05:04

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4df7cbdab9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/client/package.json Outdated
Comment thread packages/client/app/composables/useActiveTurnWakeLock.ts
Comment thread packages/client/app/composables/useActiveTurnWakeLock.ts
@comfuture

Copy link
Copy Markdown
Owner Author

@codex review
Review head: 6c62b100187178a1b036abab2a0f5bb5df921bdc

Focus on published @codori/client PWA dependency availability and active-turn wake-lock request coalescing. Confirm the existing VueUse-managed visibility reacquisition remains intact.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 6c62b10018

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@comfuture
comfuture merged commit b2a2dc8 into main Aug 12, 2026
2 checks passed
@comfuture
comfuture deleted the feat/issue-149-pwa-active-turn-wake-lock branch August 12, 2026 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add PWA support and keep active turns awake

1 participant