> 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/phase05-session04-join-approval-presence-and-reconnect-ux/tasks.md).

# Task Checklist

**Session ID**: `phase05-session04-join-approval-presence-and-reconnect-ux` **Total Tasks**: 24 **Estimated Duration**: 3-4 hours **Created**: 2026-05-30

***

## 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 | 11     | 11     | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **24** | **24** | **0**     |

***

## Setup (3 tasks)

Initial configuration and environment preparation.

### apps/warroom

* [x] T001 \[S0504] Verify Worker approve, reject, participant-change, socket-close, and catch-up contract coverage before web UX work (`apps/warroom/tests/warroom.test.ts`)

### apps/web

* [x] T002 \[S0504] Verify Session 03 War Room client, store, panel, and socket test utility baseline before adding participation state (`apps/web/src/store/useWarRoomStore.ts`)
* [x] T003 \[S0504] Verify web and Worker README boundary notes still distinguish lifecycle, approval, presence, reconnect, catch-up, and Session 05 federation scope (`apps/web/README_web.md`)

***

## Foundation (6 tasks)

Core client, helper, store, and test foundations.

### apps/web

* [x] T004 \[S0504] \[P] Extend typed Worker client helpers for approve and reject requests with schema-validated input and explicit error mapping (`apps/web/src/lib/warRoomClient.ts`)
* [x] T005 \[S0504] \[P] Create approval, presence, reconnect, and catch-up UI derivation helpers with bounded redacted summaries and exhaustive role handling (`apps/web/src/lib/warRoomPresence.ts`)
* [x] T006 \[S0504] Extend War Room store state for pending decisions, per-requester in-flight flags, reconnect attempts, caught-up summaries, and leave state with cleanup on scope exit for all acquired resources (`apps/web/src/store/useWarRoomStore.ts`)
* [x] T007 \[S0504] \[P] Create helper tests for roster sorting, local participant labels, pending queue rows, observer display, and catch-up redaction (`apps/web/tests/warRoomPresence.test.ts`)
* [x] T008 \[S0504] \[P] Extend fake browser socket utilities for participant changes, catch-up frames, server close, reconnect, and listener cleanup (`apps/web/tests/warRoomTestUtils.ts`)

### apps/warroom

* [x] T009 \[S0504] \[P] Add Worker fixture assertions for approve, reject, stale decisions, non-leader decisions, and participant snapshots with deterministic error envelopes (`apps/warroom/tests/warroom.test.ts`)

***

## Implementation (11 tasks)

Main participation UX implementation.

### apps/web

* [x] T010 \[S0504] Implement approve and reject store actions with authorization gating, duplicate-trigger prevention while in-flight, stale-state feedback, and snapshot revalidation (`apps/web/src/store/useWarRoomStore.ts`)
* [x] T011 \[S0504] Handle pending, approved, rejected, participant-change, and socket-error frames with types matching declared contract and exhaustive enum handling (`apps/web/src/store/useWarRoomStore.ts`)
* [x] T012 \[S0504] Implement reconnect and retry policy with timeout, retry/backoff, failure-path handling, and cleanup of replaced sockets (`apps/web/src/store/useWarRoomStore.ts`)
* [x] T013 \[S0504] Implement bounded catch-up summary state without rendering raw Worker event payloads, replay buffers, exports, scan data, media drafts, diagnostics, prompts, paths, commands, or secrets (`apps/web/src/store/useWarRoomStore.ts`)
* [x] T014 \[S0504] Implement leave and disconnect reset semantics with duplicate-trigger prevention while in-flight and copy that avoids trusted-erasure claims (`apps/web/src/store/useWarRoomStore.ts`)
* [x] T015 \[S0504] \[P] Add participant roster component with leader, member, observer, pending, online/offline, and local-participant labels with platform-appropriate accessibility labels, focus management, and input support (`apps/web/src/components/WarRoomRoster.tsx`)
* [x] T016 \[S0504] \[P] Add leader approval queue component with approve/reject controls, stale/non-leader states, disabled-while-pending behavior, and state reset or revalidation on re-entry (`apps/web/src/components/WarRoomApprovalQueue.tsx`)
* [x] T017 \[S0504] Wire roster, approval queue, reconnect, catch-up, retry, disconnect, and leave controls into the War Room panel with explicit loading, empty, error, and offline states (`apps/web/src/components/WarRoomPanel.tsx`)
* [x] T018 \[S0504] Update War Room lifecycle and error copy for non-leader decisions, stale decisions, reconnecting, caught-up, rejected, left, and catch-up summaries (`apps/web/src/lib/warRoomUi.ts`)
* [x] T019 \[S0504] Update web README Phase 05 notes for approval, presence, reconnect, catch-up, leave, and remaining Session 05 federation deferrals (`apps/web/README_web.md`)

### apps/warroom

* [x] T020 \[S0504] Update Worker README behavior notes for reject route, disconnect-only leave semantics, participant presence, and bounded catch-up limits (`apps/warroom/README_warroom.md`)

***

## Testing (4 tasks)

Verification and quality assurance.

### apps/web

* [x] T021 \[S0504] \[P] Add client tests for approve/reject success, stale decision, non-leader decision, rate-limit, unavailable Worker, malformed response, and safe error mapping (`apps/web/tests/warRoomClient.test.ts`)
* [x] T022 \[S0504] \[P] Add store tests for approval decisions, participant presence updates, reconnect retry, catch-up summaries, leave cleanup, socket cleanup, and duplicate guards (`apps/web/tests/warRoomStore.test.ts`)
* [x] T023 \[S0504] \[P] Add component tests for approval queue controls, roster accessibility, pending/rejected copy, reconnect/catch-up states, non-leader copy, and unavailable Worker feedback (`apps/web/tests/WarRoomPanel.test.tsx`)

### Cross-package

* [x] T024 \[S0504] Run focused Worker/web tests, relevant package typechecks, and ASCII/LF validation for all Session 04 files (`apps/web/tests/WarRoomPanel.test.tsx`)

***

## 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

Run the validate workflow step to verify session completeness.


---

# 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/phase05-session04-join-approval-presence-and-reconnect-ux/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.
