> 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/phase06-session04-collaborative-cockpit-ux-and-remote-context/tasks.md).

# Task Checklist

**Session ID**: `phase06-session04-collaborative-cockpit-ux-and-remote-context` **Total Tasks**: 22 **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     | 5      | 5      | 0         |
| Implementation | 10     | 10     | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **22** | **22** | **0**     |

***

## Setup (3 tasks)

Initial context verification and implementation note setup.

### apps/web

* [x] T001 \[S0604] Review Session 01 baseline, routing matrix, Session 04 stub, Session 02 authority outputs, Session 03 safe-event outputs, and current web War Room files; record web scope (`.spec_system/specs/phase06-session04-collaborative-cockpit-ux-and-remote-context/implementation-notes.md`)
* [x] T002 \[S0604] Run focused baseline web War Room helper, store, component, and battlefield overlay tests; record no-Cloudflare credential assumptions (`.spec_system/specs/phase06-session04-collaborative-cockpit-ux-and-remote-context/implementation-notes.md`)
* [x] T003 \[S0604] Verify current app Playwright desktop/mobile War Room evidence paths and mocked Worker setup before UX changes (`tests/e2e/app.e2e.ts`)

***

## Foundation (5 tasks)

Core copy, row, summary, and state foundations.

### apps/web

* [x] T004 \[S0604] Refine lifecycle, authority, role, remote-context, notice, and failure copy helpers (`apps/web/src/lib/warRoomUi.ts`) with explicit loading, empty, error, offline states and no hosted-identity wording
* [x] T005 \[S0604] Refine roster and approval row derivation (`apps/web/src/lib/warRoomPresence.ts`) with deterministic ordering, accessible labels, disabled decision reasons, and exhaustive role handling
* [x] T006 \[S0604] Refine remote-context summaries and safe notice helpers (`apps/web/src/lib/warRoomFederation.ts`) with bounded labels, sensitive-text exclusion, deterministic ordering, and explicit error mapping
* [x] T007 \[S0604] Harden War Room store state boundaries (`apps/web/src/store/useWarRoomStore.ts`) with duplicate-trigger prevention while in-flight, stale-state revalidation, remote-context cleanup, and scoped rollback on send failure
* [x] T008 \[S0604] \[P] Add focused helper tests for role copy, disabled reasons, remote summaries, notice helpers, sensitive text, and no raw payload wording (`apps/web/tests/warRoomPresence.test.ts`, `apps/web/tests/warRoomFederation.test.ts`)

***

## Implementation (10 tasks)

Main collaborative cockpit UX and remote-context behavior.

### apps/web

* [x] T009 \[S0604] Rework War Room panel status and room-control sections (`apps/web/src/components/WarRoomPanel.tsx`) with local-only, unavailable, pending, approved, rejected, connected, reconnecting, caught-up, disconnected, left, and authority-failed states
* [x] T010 \[S0604] Add clearer active-room, authority, reconnect, disconnect, leave, and reset controls (`apps/web/src/components/WarRoomPanel.tsx`) with duplicate-trigger prevention while in-flight and state reset or revalidation on re-entry
* [x] T011 \[S0604] Add safe remote-context and room-notice affordances (`apps/web/src/components/WarRoomPanel.tsx`) with platform-appropriate accessibility labels, focus management, input support, and no raw payload wording
* [x] T012 \[S0604] Tighten approval queue behavior (`apps/web/src/components/WarRoomApprovalQueue.tsx`) with disabled leader/member/observer states, decision-in-flight feedback, visible failure copy, and duplicate-trigger prevention while in-flight
* [x] T013 \[S0604] Tighten participant roster rendering (`apps/web/src/components/WarRoomRoster.tsx`) with role/status text equivalents, local participant markers, long-name handling, and accessible labels
* [x] T014 \[S0604] Update remote battlefield marker rendering (`apps/web/src/components/battlefield/RemoteParticipantOverlay.tsx`) with visually separate remote context, accessible labels, bounded text, and no local selection mutation
* [x] T015 \[S0604] Harden store actions for approve, reject, reconnect, disconnect, leave, reset, and notice send (`apps/web/src/store/useWarRoomStore.ts`) with authorization-aware failure handling and state reset or revalidation on re-entry
* [x] T016 \[S0604] Extend War Room panel tests (`apps/web/tests/WarRoomPanel.test.tsx`) with lifecycle, authority, role, remote-context, notice, failure, leave/reset, duplicate guard, and accessibility coverage
* [x] T017 \[S0604] \[P] Extend War Room store tests (`apps/web/tests/warRoomStore.test.ts`) with duplicate guards, stale snapshot revalidation, authority failures, remote-context cleanup, notice send, reconnect, leave, and reset flows
* [x] T018 \[S0604] \[P] Update web README Session 04 notes (`apps/web/README_web.md`) with shipped collaboration UX, optional transfer limits, source-of-truth separation, duplicate guards, and Phase 07/08 deferrals

***

## Testing (4 tasks)

Verification and quality assurance.

### apps/web

* [x] T019 \[S0604] \[P] Extend battlefield remote overlay tests (`apps/web/tests/WarRoomBattlefieldOverlay.test.tsx`) with remote-context separation from local hero selection, replay persistence, export requests, and settings
* [x] T020 \[S0604] Extend app desktop/mobile Playwright evidence (`tests/e2e/app.e2e.ts`) with role, remote-context, reconnect, unavailable, leave/reset, and safe-copy checks
* [x] T021 \[S0604] Run focused web War Room tests, package typecheck, and relevant app Playwright projects; record command results and evidence paths (`.spec_system/specs/phase06-session04-collaborative-cockpit-ux-and-remote-context/implementation-notes.md`)
* [x] T022 \[S0604] Run `git diff --check`, validate ASCII/LF for changed files, and write security-compliance review (`.spec_system/specs/phase06-session04-collaborative-cockpit-ux-and-remote-context/security-compliance.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

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/phase06-session04-collaborative-cockpit-ux-and-remote-context/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.
