> For the complete documentation index, see [llms.txt](https://faction-os.gitbook.io/faction-os-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase04-session05-browser-audio-runtime-and-controls/tasks.md).

# Task Checklist

**Session ID**: `phase04-session05-browser-audio-runtime-and-controls` **Total Tasks**: 22 **Estimated Duration**: 3-4 hours **Created**: 2026-05-29

***

## Legend

* `[x]` = Completed
* `[ ]` = Pending
* `[P]` = Parallelizable (can run with other \[P] tasks)
* `[SNNMM]` = Session reference (NN=phase number, MM=session number)
* `TNNN` = Task ID

***

## Progress Summary

| Category       | Total  | Done   | Remaining |
| -------------- | ------ | ------ | --------- |
| Setup          | 3      | 3      | 0         |
| Foundation     | 6      | 6      | 0         |
| Implementation | 9      | 9      | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **22** | **22** | **0**     |

***

## Setup (3 tasks)

Initial configuration and environment preparation.

### apps/web

* [x] T001 \[S0405] Verify Session 02, Session 03, and Session 04 prerequisites plus current `apps/web` audio/catalog files (`.spec_system/specs/phase04-session05-browser-audio-runtime-and-controls/implementation-notes.md`)
* [x] T002 \[S0405] Record current audio settings, voice synth, hero speak, command palette, and draft audio catalog behavior (`.spec_system/specs/phase04-session05-browser-audio-runtime-and-controls/implementation-notes.md`)
* [x] T003 \[S0405] Create implementation notes and security compliance artifacts for the browser audio runtime scope (`.spec_system/specs/phase04-session05-browser-audio-runtime-and-controls/security-compliance.md`)

***

## Foundation (6 tasks)

Core structures and base implementations.

### apps/web

* [x] T004 \[S0405] \[P] Create audio runtime result types, support checks, visible-equivalent copy, and duplicate guard helpers with schema-validated input and explicit error mapping (`apps/web/src/lib/audioRuntime.ts`)
* [x] T005 \[S0405] \[P] Create transient audio runtime store for status, last cue, blocked/failed states, and in-flight cues with cleanup on scope exit for all acquired resources (`apps/web/src/store/useAudioRuntimeStore.ts`)
* [x] T006 \[S0405] \[P] Extend settings store audio defaults, bounded volume or intensity, persistence, reset, and stale snapshot recovery with denied/restricted/revoked handling and fallback behavior (`apps/web/src/store/useSettingsStore.ts`)
* [x] T007 \[S0405] Refactor voice synth unlock and playback helpers to return structured results, clean up Web Audio nodes, and handle unsupported or failed resume paths (`apps/web/src/lib/voiceSynth.ts`)
* [x] T008 \[S0405] \[P] Add audio runtime unit tests for support states, result copy, duplicate guards, and redacted failure details (`apps/web/tests/audioRuntime.test.ts`)
* [x] T009 \[S0405] Update settings store tests for default-off audio, persisted opt-in, bounded volume, malformed snapshots, and reset behavior (`apps/web/tests/useSettingsStore.test.ts`)

***

## Implementation (9 tasks)

Main feature implementation.

### apps/web

* [x] T010 \[S0405] Wire hero transition barks through the audio runtime with duplicate-trigger prevention while in-flight and visible equivalents for muted, blocked, failed, and unavailable states (`apps/web/src/store/useVoiceBarks.ts`)
* [x] T011 \[S0405] Update Settings audio controls for opt-in toggle, volume or intensity control, browser status, test cue, and reset-safe copy with platform-appropriate accessibility labels, focus management, and input support (`apps/web/src/components/SettingsDrawer.tsx`)
* [x] T012 \[S0405] Update Hero Speak action to use audio runtime results, disabled reasons, last-cue copy, and duplicate-trigger prevention while in-flight (`apps/web/src/components/HeroDetailDrawer.tsx`)
* [x] T013 \[S0405] Update command palette audio state, labels, and toggle action for explicit opt-in audio cues without implying file-backed media availability (`apps/web/src/lib/commandPalette.ts`)
* [x] T014 \[S0405] Pass updated audio state into the command palette and preserve settings deep-link behavior (`apps/web/src/components/CommandPalette.tsx`)
* [x] T015 \[S0405] Update app media catalog draft audio records to keep file-backed voice, SFX, alert, celebration, and music assets blocked until approved gates exist (`apps/web/src/data/mediaCatalog.ts`)
* [x] T016 \[S0405] Add Settings audio component tests for opt-in, volume, unsupported, blocked, failed, test cue, reset, and visible-equivalent states (`apps/web/tests/SettingsAudio.test.tsx`)
* [x] T017 \[S0405] Update Hero Speak tests for enabled, muted, failed, blocked, unavailable, and duplicate-click behavior (`apps/web/tests/HeroDetailDrawer.test.tsx`)
* [x] T018 \[S0405] Update web and media docs for opt-in browser audio behavior, visible equivalents, synthetic runtime scope, and deferred file-backed asset policy (`apps/web/README_web.md`)

***

## Testing (4 tasks)

Verification and quality assurance.

### apps/web

* [x] T019 \[S0405] Update media docs with Session 05 audio runtime notes and blocked file-backed asset handoff (`docs/media-assets.md`)
* [x] T020 \[S0405] Run focused audio, settings, hero detail, and command palette tests plus `npm --workspace apps/web run typecheck` (`.spec_system/specs/phase04-session05-browser-audio-runtime-and-controls/implementation-notes.md`)
* [x] T021 \[S0405] Run relevant media/catalog gates including `npm run media:drafts:check` and `npm run media:visual:check` to confirm no file-backed audio promotion (`.spec_system/specs/phase04-session05-browser-audio-runtime-and-controls/implementation-notes.md`)
* [x] T022 \[S0405] Run final format, lint, ASCII/LF, and privacy/quarantine checks before validate handoff (`.spec_system/specs/phase04-session05-browser-audio-runtime-and-controls/implementation-notes.md`)

***

## Completion Checklist

Before marking session complete:

* [x] All tasks marked `[x]`
* [x] All tests passing
* [x] All files ASCII-encoded
* [x] implementation-notes.md updated
* [x] Ready for the validate workflow step

***

## Next Steps

Session complete. Use `updateprd` closeout artifacts as the session record.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase04-session05-browser-audio-runtime-and-controls/tasks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
