> 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/phase21-session01-expansion-state-foundation/tasks.md).

# Task Checklist

**Session ID**: `phase21-session01-expansion-state-foundation` **Total Tasks**: 18 **Estimated Duration**: 2-4 hours **Created**: 2026-06-29

***

## Progress Summary

| Metric              | Value   |
| ------------------- | ------- |
| Tasks Completed     | 18 / 18 |
| Estimated Remaining | 0 hours |
| Blockers            | 0       |

***

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

***

## Setup (3 tasks)

* [x] T001 \[S2101] Verify Phase 21 Session 01 prerequisites and analyzer state before implementation (`.spec_system/PRD/phase_21/session_01_expansion_state_foundation.md`)
* [x] T002 \[S2101] \[P] Audit settings store transient fields, persistence shape, and reset semantics (`apps/web/src/store/useSettingsStore.ts`)
* [x] T003 \[S2101] \[P] Audit `DEFAULT_SETTINGS` reset sites that can leak transient overlays (`apps/web/tests`)

***

## Foundation (4 tasks)

* [x] T004 \[S2101] Add the `BottomRailSurfaceId` typed union for `quest-board`, `orchestration`, and `war-room` (`apps/web/src/store/useSettingsStore.ts`)
* [x] T005 \[S2101] Add `expandedBottomRailSurfaceId` and `setExpandedBottomRailSurfaceId` to the settings store interface (`apps/web/src/store/useSettingsStore.ts`)
* [x] T006 \[S2101] Introduce canonical transient default state so reset paths can clear overlays without adding them to durable defaults (`apps/web/src/store/useSettingsStore.ts`)
* [x] T007 \[S2101] Confirm persisted snapshot types and normalization exclude expansion state and ignore stale localStorage values (`apps/web/src/store/useSettingsStore.ts`)

***

## Implementation (7 tasks)

* [x] T008 \[S2101] Initialize `expandedBottomRailSurfaceId` to `null` with the existing transient overlay state (`apps/web/src/store/useSettingsStore.ts`)
* [x] T009 \[S2101] Implement the expansion setter so setting a new id replaces the old id and setting `null` clears state (`apps/web/src/store/useSettingsStore.ts`)
* [x] T010 \[S2101] Update `resetSettings()` to restore durable defaults and clear all transient overlays including expansion state (`apps/web/src/store/useSettingsStore.ts`)
* [x] T011 \[S2101] Update browser erasure settings reset to use the canonical reset path or transient defaults without adding trusted-erasure claims (`apps/web/src/components/LocalErasurePanel.tsx`)
* [x] T012 \[S2101] \[P] Add focused store tests for default, set, replace, clear, reset, hydration, and persistence exclusion (`apps/web/tests/useSettingsStore.test.ts`)
* [x] T013 \[S2101] \[P] Update settings reset-helper tests so expansion state cannot leak (`apps/web/tests/settingsNotifications.test.ts`, `apps/web/tests/SettingsAudio.test.tsx`)
* [x] T014 \[S2101] \[P] Update cockpit, mobile, shortcut, command, notice, roster, and notification reset helpers so expansion state cannot leak (`apps/web/tests/CockpitShell.test.tsx`, `apps/web/tests/MobileAccessibility.test.tsx`, `apps/web/tests/KeyboardShortcutsModal.test.tsx`, `apps/web/tests/CommandPalette.test.tsx`, `apps/web/tests/keyboardShortcuts.test.ts`, `apps/web/tests/NoticeBoard.test.tsx`, `apps/web/tests/HeroRosterSort.test.tsx`, `apps/web/tests/useNotifications.test.tsx`)

***

## Testing (4 tasks)

* [x] T015 \[S2101] \[P] Run focused settings tests (`npm test -- apps/web/tests/useSettingsStore.test.ts apps/web/tests/settingsNotifications.test.ts apps/web/tests/SettingsAudio.test.tsx`)
* [x] T016 \[S2101] \[P] Run shell and modal reset-helper tests (`npm test -- apps/web/tests/CockpitShell.test.tsx apps/web/tests/MobileAccessibility.test.tsx apps/web/tests/KeyboardShortcutsModal.test.tsx apps/web/tests/CommandPalette.test.tsx`)
* [x] T017 \[S2101] \[P] Run keyboard, notice, roster, and notification reset-leakage tests (`npm test -- apps/web/tests/keyboardShortcuts.test.ts apps/web/tests/NoticeBoard.test.tsx apps/web/tests/HeroRosterSort.test.tsx apps/web/tests/useNotifications.test.tsx`)
* [x] T018 \[S2101] Run web typecheck and ASCII/LF validation (`npm run typecheck --workspace @factionos/web`)

***

## 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://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase21-session01-expansion-state-foundation/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.
