> 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/phase02-session03-hero-and-mission-workflow-completion/tasks.md).

# Task Checklist

**Session ID**: `phase02-session03-hero-and-mission-workflow-completion` **Total Tasks**: 22 **Estimated Duration**: 3-4 hours **Created**: 2026-05-29

***

## 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 verification and evidence capture.

* [x] T001 \[S0203] Verify Session 01 and Session 02 prerequisites plus baseline hero, mission, permission, plan, and shell tests (`.spec_system/PRD/phase_02/session_03_hero_and_mission_workflow_completion.md`)
* [x] T002 \[S0203] Create implementation notes with baseline evidence, commands, decisions, and open-risk log (`.spec_system/specs/phase02-session03-hero-and-mission-workflow-completion/implementation-notes.md`)
* [x] T003 \[S0203] Audit current hero, mission, permission, and plan workflow contracts against PRD, UX PRD, and API docs without adding new protocol scope (`apps/web/README_web.md`)

***

## Foundation (5 tasks)

Core workflow state, copy helpers, and test fixtures.

* [x] T004 \[S0203] \[P] Create workflow context helper for selection labels, filter summaries, permission expiry, and plan statuses with types matching declared contract and exhaustive enum handling (`apps/web/src/lib/workflowContext.ts`)
* [x] T005 \[S0203] \[P] Write workflow context unit tests for helper output, empty states, expiry states, and plan statuses (`apps/web/tests/workflowContext.test.ts`)
* [x] T006 \[S0203] Add synchronized hero and mission workflow actions to the game store with state reset or revalidation on re-entry (`apps/web/src/store/useGameStore.ts`)
* [x] T007 \[S0203] Harden permission and plan resolution paths in the game store with duplicate-trigger prevention while in-flight (`apps/web/src/store/useGameStore.ts`)
* [x] T008 \[S0203] \[P] Create shared hero, mission, permission, and plan fixtures for focused workflow tests (`apps/web/tests/workflowFixtures.ts`)

***

## Implementation (10 tasks)

Main hero, mission, permission, plan, and workflow handoff behavior.

* [x] T009 \[S0203] Update HeroCard selected state, accessible label, active mission context, and shared hero opener with platform-appropriate accessibility labels, focus management, and input support (`apps/web/src/components/HeroCard.tsx`)
* [x] T010 \[S0203] Update HeroRoster selected-scope summary and clear affordance with explicit empty and filtered states (`apps/web/src/components/HeroRoster.tsx`)
* [x] T011 \[S0203] Update HeroDetailDrawer active mission and recent mission handoffs with state reset or revalidation on re-entry (`apps/web/src/components/HeroDetailDrawer.tsx`)
* [x] T012 \[S0203] Update MissionLog filter summary, hero-scope clear action, empty-state copy, deterministic ordering, and shared mission opener with bounded filtering behavior (`apps/web/src/components/MissionLog.tsx`)
* [x] T013 \[S0203] Update MissionDetailDrawer hero context, plan/status context, missing metric fallbacks, and redacted text treatment with explicit loading, empty, error, and offline states (`apps/web/src/components/MissionDetailDrawer.tsx`)
* [x] T014 \[S0203] Update MissionTimeline captions, labels, and no-history handling so mission history remains understandable without color-only cues (`apps/web/src/components/MissionTimeline.tsx`)
* [x] T015 \[S0203] Update PermissionModal dialog semantics, requester context, expiry state, approve/deny feedback, and duplicate-trigger prevention while in-flight (`apps/web/src/components/PermissionModal.tsx`)
* [x] T016 \[S0203] Update PlanWorkpad accessible drawer semantics, task-state hierarchy, budget context, approve/reject feedback, and duplicate-trigger prevention while in-flight (`apps/web/src/components/PlanWorkpad.tsx`)
* [x] T017 \[S0203] Route Leaderboard hero drilldown through the shared workflow action and preserve selected context with accessible row labels (`apps/web/src/components/Leaderboard.tsx`)
* [x] T018 \[S0203] Document completed hero, mission, permission, and plan workflow behavior plus deferred orchestration boundaries (`apps/web/README_web.md`)

***

## Testing (4 tasks)

Focused verification and quality gates.

* [x] T019 \[S0203] \[P] Write hero-to-mission workflow component tests for selection sync, filter clear, drawer handoffs, and accessibility (`apps/web/tests/HeroMissionWorkflow.test.tsx`)
* [x] T020 \[S0203] \[P] Write PermissionModal component tests for context, expiry, Escape/close behavior, and duplicate-trigger prevention (`apps/web/tests/PermissionModal.test.tsx`)
* [x] T021 \[S0203] \[P] Write PlanWorkpad component tests for step rendering, pending feedback, close behavior, and duplicate-trigger prevention (`apps/web/tests/PlanWorkpad.test.tsx`)
* [x] T022 \[S0203] Run focused workflow tests, existing hero/mission tests, `npm --workspace apps/web run typecheck`, ASCII validation, and manual workflow smoke checks (`apps/web/package.json`)

***

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

ASCII validation passed after normalizing the remaining legacy UI glyphs in the reviewed session deliverables and updating affected component tests.

***

## Next Steps

Run `updateprd` to mark the validated session complete.


---

# 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/phase02-session03-hero-and-mission-workflow-completion/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.
