> 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/phase10-session04-web-codex-awareness/tasks.md).

# Task Checklist

**Session ID**: `phase10-session04-web-codex-awareness` **Total Tasks**: 22 **Estimated Duration**: 3-4 hours **Created**: 2026-05-31

***

## Legend

* `[x]` = Completed
* `[ ]` = Pending
* `[P]` = Parallelizable (can run with other \[P] tasks)
* `[S1004]` = Session reference (10=phase number, 04=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 state confirmation and source review.

### Cross-package

* [x] T001 \[S1004] Verify Phase 10 Session 04 prerequisites, completed-session state, and cross-package scope (`.spec_system/PRD/phase_10/session_04_web_codex_awareness.md`)
* [x] T002 \[S1004] Review web cockpit surfaces that render hero CLI labels, mission filters, tool usage, replay, and export behavior (`apps/web/src/components/HeroCard.tsx`)
* [x] T003 \[S1004] \[P] Review protocol hero CLI metadata and existing exhaustive display-helper tests (`packages/protocol/src/heroes.ts`)

***

## Foundation (5 tasks)

Protocol label guarantees, web helpers, and sanitized fixtures.

### packages/protocol

* [x] T004 \[S1004] Extend protocol hero CLI tests for complete display labels and provider labels across Claude Code, Codex CLI, Cursor, OpenCode, OpenClaw, and Web (`packages/protocol/tests/heroes.test.ts`)

### apps/web

* [x] T005 \[S1004] \[P] Create protocol-backed CLI display helper with Codex visual treatment, external model handling, and exhaustive fallback behavior (`apps/web/src/lib/heroCli.ts`)
* [x] T006 \[S1004] \[P] Create sanitized Codex awareness fixture builders for `codex-cli`, OpenAI external models, `apply_patch`, Bash, MCP tools, replay, and export cases (`apps/web/tests/codexAwarenessFixtures.ts`)
* [x] T007 \[S1004] Add pure helper tests for CLI labels, provider labels, Codex treatment, external model display, and unknown fallback behavior (`apps/web/tests/heroCli.test.ts`)
* [x] T008 \[S1004] Extend tool category helper for `apply_patch`, Bash terminal, and `mcp__*` names with bounded custom fallback behavior (`apps/web/src/lib/toolUsage.ts`)

***

## Implementation (10 tasks)

Codex-aware web display, filtering, analytics inclusion, and browser privacy boundaries.

### apps/web

* [x] T009 \[S1004] Render protocol-backed CLI labels and Codex visual treatment on hero cards with accessible labels, focus-safe chips, and no raw CLI fallback text (`apps/web/src/components/HeroCard.tsx`)
* [x] T010 \[S1004] Render protocol-backed CLI labels, provider copy, and external model handling in hero detail header with revalidation on drawer open (`apps/web/src/components/HeroDetailDrawer.tsx`)
* [x] T011 \[S1004] Update no-server seed data with a sanitized Codex hero and mission using external model tier plus bounded `apply_patch`, Bash, and MCP summaries (`apps/web/src/data/seedData.ts`)
* [x] T012 \[S1004] Extend mission filtering/search to match hero names, CLI labels, provider labels, raw CLI ids, model labels/ids, and tool names while preserving state/tag/hero-scope composition (`apps/web/src/components/MissionLog.tsx`)
* [x] T013 \[S1004] Render categorized tool pills for Bash, `apply_patch`, and `mcp__*` with platform-appropriate accessibility labels, text fitting, and no raw argument exposure (`apps/web/src/components/MissionLog.tsx`)
* [x] T014 \[S1004] Render CLI labels in leaderboard rows and accessible names so Codex heroes rank without fallback labels or misleading provider copy (`apps/web/src/components/Leaderboard.tsx`)
* [x] T015 \[S1004] Ensure faction standings and efficiency drilldowns include Codex heroes through existing metric paths with visible empty states and no provider-specific exclusions (`apps/web/src/components/FactionStandings.tsx`)
* [x] T016 \[S1004] Redact Codex-shaped replay fields for snake\_case tool names, transcript paths, terminal output, patch text, MCP arguments, tokens, URLs, and broad paths (`apps/web/src/lib/replayLink.ts`)
* [x] T017 \[S1004] Harden export failure sanitization for Codex-shaped command previews, broad paths, bearer strings, token-like values, URLs, and JSON error envelopes (`apps/web/src/lib/exportSession.ts`)
* [x] T018 \[S1004] Update web README notes for Codex display labels, local-only replay/export privacy, and first-class cockpit surfaces (`apps/web/README_web.md`)

***

## Testing (4 tasks)

Focused web/protocol verification and quality gates.

### Cross-package

* [x] T019 \[S1004] Add Codex display tests for hero card, hero detail, leaderboard, and standings surfaces using sanitized fixtures (`apps/web/tests/HeroCard.test.tsx`)
* [x] T020 \[S1004] Add Codex mission search, filter composition, tool pill, and tool category tests for `codex-cli`, `apply_patch`, Bash, and MCP names (`apps/web/tests/MissionLogFilter.test.tsx`)
* [x] T021 \[S1004] Add Codex replay and export privacy tests for prompts, command previews, broad paths, transcripts, terminal output, patch text, token-like values, URLs, and MCP arguments (`apps/web/tests/replayLink.test.ts`)
* [x] T022 \[S1004] Run focused protocol/web suites, typecheck, Biome, `git diff --check`, and ASCII/LF validation for planned files (`vitest.config.ts`)

***

## 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. Run updateprd to archive the phase record and transition to the phase-transition workflow.


---

# 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/phase10-session04-web-codex-awareness/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.
