> For the complete documentation index, see [llms.txt](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/sessions/phase31-session03-app-data-and-mutation-boundary/tasks.md).

# Task Checklist

**Session ID**: `phase31-session03-app-data-and-mutation-boundary` **Total Tasks**: 21 **Estimated Duration**: 3-4 hours **Created**: 2026-06-24

***

Legend: `[x]` completed; `[ ]` pending; `[P]` parallelizable; `[SNNMM]` session ref; `TNNN` task ID.

***

## Setup (3 tasks)

* [x] T001 \[S3103] Verify Session 01 and Session 02 validation evidence, the Session 03 stub, and committed demo snapshot inputs before editing (`.spec_system/specs/phase31-session01-demo-mode-foundation/validation.md`, `.spec_system/specs/phase31-session02-snapshot-exporter-and-fixtures/validation.md`, `.spec_system/PRD/phase_31/session_03_app_data_and_mutation_boundary.md`, `demo-website/public/demo/live-data.snapshot.json`)
* [x] T002 \[S3103] Inventory shared bridge entry points that must be guarded for public demo mode (`src/lib/use-live-data.ts`, `src/lib/time-saved.ts`, `src/components/setup/use-setup-gating.ts`, `src/lib/use-aggregate-refresh.ts`, `src/lib/use-dream-run.ts`, `src/routes/__root.tsx`)
* [x] T003 \[S3103] Create the implementation evidence log for bridge-boundary decisions, tests, disabled-control copy, and residual risk (`.spec_system/specs/phase31-session03-app-data-and-mutation-boundary/implementation-notes.md`)

***

## Foundation (5 tasks)

* [x] T004 \[S3103] Extend public demo helpers for the snapshot endpoint, public operator identity, and shared unavailable-control copy (`src/lib/public-demo.ts`)
* [x] T005 \[S3103] Update LiveData query options to fetch `/demo/live-data.snapshot.json` in public demo mode with schema-validated input and explicit error mapping (`src/lib/use-live-data.ts`)
* [x] T006 \[S3103] \[P] Add focused LiveData tests for public demo snapshot loading, malformed snapshot fallback, normal local `/__live-data` behavior, and no private bridge fallback (`src/lib/__tests__/use-live-data.test.tsx`)
* [x] T007 \[S3103] Update operator identity resolution so public demo mode ignores env/localStorage/private proxy values and returns public demo copy/assets (`src/lib/operator-profile.ts`, `src/components/app-sidebar.tsx`)
* [x] T008 \[S3103] \[P] Add identity tests for public demo name/avatar behavior, normal local env/storage precedence, and no `/__operator-photo` proxy in public demo mode (`src/lib/__tests__/operator-profile.test.ts`)

***

## Implementation (8 tasks)

* [x] T009 \[S3103] Update time-saved overlays to skip `/__time-saved-config` in public demo mode while preserving browser-local/default ROI controls (`src/lib/time-saved.ts`)
* [x] T010 \[S3103] Suppress setup auto-open, `/__just-installed`, setup draft writes, and install-config writes in public demo mode with read-only unavailable setup copy (`src/components/setup/use-setup-gating.ts`, `src/components/setup/setup-modal.tsx`, `src/routes/setup.tsx`)
* [x] T011 \[S3103] Update aggregate refresh controls to return disabled public demo state before `/__token` or `/__refresh_data` can be fetched with duplicate-trigger prevention while in-flight (`src/lib/use-aggregate-refresh.ts`, `src/components/aggregate-refresh-button.tsx`)
* [x] T012 \[S3103] Update Dream run controls to return disabled public demo state before `/__token` or `/__run_dream` can be fetched with duplicate-trigger prevention while in-flight (`src/lib/use-dream-run.ts`, `src/components/dream-run-button.tsx`)
* [x] T013 \[S3103] Disable Hermes and OpenClaw header status polling in public demo mode with explicit unavailable/demo states and no loopback query construction (`src/components/hermes/hermes-status-pill.tsx`, `src/components/openclaw-status-pill.tsx`, `src/routes/__root.tsx`)
* [x] T014 \[S3103] Update Trend Finder shared run provider and run hook to return disabled demo-only controls before `/__token`, `/__run_trend_finder`, or `/__refresh_status` can be fetched (`src/extensions/trend-finder/trend-finder-run-provider.tsx`, `src/extensions/trend-finder/hooks/use-trend-finder-run.ts`)
* [x] T015 \[S3103] Update Creator Lens, scheduler status, and source setup shared clients so public demo mode uses browser-local or unavailable states before token or write calls (`src/extensions/trend-finder/hooks/use-creator-lens-draft.ts`, `src/extensions/trend-finder/use-scheduler-status.ts`, `src/extensions/trend-finder/source-setup.ts`)
* [x] T016 \[S3103] Review home, skills, settings, and setup product copy so public demo unavailable controls are clear and diagnostics remain out of user-facing surfaces (`src/routes/index.tsx`, `src/routes/skills.tsx`, `src/routes/settings.tsx`, `src/routes/setup.tsx`)

***

## Testing (5 tasks)

* [x] T017 \[S3103] \[P] Add focused hook tests for time-saved, setup gating, aggregate refresh, and Dream run no-bridge behavior in public demo mode (`src/lib/__tests__/time-saved-hook.test.tsx`, `src/components/setup/__tests__/use-setup-gating.test.ts`, `src/lib/__tests__/use-aggregate-refresh.test.tsx`, `src/lib/__tests__/use-dream-run.test.tsx`)
* [x] T018 \[S3103] \[P] Add focused route/component tests for disabled public demo refresh, Dream, setup, status pill, and top-bar Trend Finder controls (`src/components/__tests__/aggregate-refresh-button.test.tsx`, `src/components/__tests__/dream-run-button.test.tsx`, `src/routes/__tests__/root-component.test.tsx`, `src/routes/__tests__/settings-share-setup.test.tsx`)
* [x] T019 \[S3103] \[P] Add Trend Finder shared-control tests proving run, Creator Lens, scheduler, and source-setup public demo paths do not fetch `/__token` or mutation endpoints (`src/lib/__tests__/trend-finder-dashboard.test.tsx`, `src/extensions/trend-finder/components/__tests__/scheduler-status.test.tsx`)
* [x] T020 \[S3103] Run focused public-demo bridge-boundary suites and repair failures without weakening normal local bridge behavior (`src/lib/__tests__/use-live-data.test.tsx`, `src/lib/__tests__/time-saved-hook.test.tsx`, `src/lib/__tests__/use-aggregate-refresh.test.tsx`, `src/lib/__tests__/use-dream-run.test.tsx`, `src/routes/__tests__/root-component.test.tsx`)
* [x] T021 \[S3103] Run typecheck, targeted lint/format, diff whitespace, ASCII/LF checks, and implementation evidence completeness checks (`tsconfig.json`, `eslint.config.js`, `.prettierrc`, `.spec_system/specs/phase31-session03-app-data-and-mutation-boundary/implementation-notes.md`)

***

## Completion Checklist

* [x] All tasks marked `[x]`
* [x] All tests and checks passing
* [x] All files ASCII-encoded with LF line endings
* [x] implementation-notes.md updated
* [x] Ready for `creview` to continue the implement -> creview -> validate sequence

***

## Next Steps

Run the `creview` workflow step.


---

# 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://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/sessions/phase31-session03-app-data-and-mutation-boundary/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.
