> 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/specs/phase24-session04-combat-playback-effects-layer/tasks.md).

# Task Checklist

**Session ID**: `phase24-session04-combat-playback-effects-layer` **Total Tasks**: 22 **Estimated Duration**: 3-4 hours **Created**: 2026-07-08

***

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

***

## Setup (2 tasks)

* [x] T001 \[S2404] Verify Phase 24 Session 04 prerequisites and package-local commands (`.spec_system/PRD/phase_24/session_04_combat_playback_effects_layer.md`)
* [x] T002 \[S2404] Inventory battlefield layer ordering, store event log, missions, camp links, and ranked camp placement seams (`apps/web/src/components/battlefield/Battlefield.tsx`)

***

## Foundation (6 tasks)

* [x] T003 \[S2404] \[P] Create pure combat playback effect types, constants, caps, and display-state contracts (`apps/web/src/lib/combatPlaybackEffects.ts`)
* [x] T004 \[S2404] Implement linked event selection from `ReplayEntry`, `missions`, and `gameProjection.campLinks` with exhaustive typed handling for supported `ServerEvent` variants (`apps/web/src/lib/combatPlaybackEffects.ts`)
* [x] T005 \[S2404] Implement combo, stage-prop, HP-drain, counterattack, and verification-only kill derivation using `combatPlayback.ts` helpers without persistent state (`apps/web/src/lib/combatPlaybackEffects.ts`)
* [x] T006 \[S2404] \[P] Export or adapt camp placement data for effects rendering without changing `CampLayer` camp authority (`apps/web/src/components/battlefield/CampLayer.tsx`)
* [x] T007 \[S2404] \[P] Create reusable playback fixtures for linked camps, missions, tool events, verification events, and hostile labels (`apps/web/tests/combatPlaybackEffects.test.ts`)
* [x] T008 \[S2404] Define layer test ids and presentation fixtures for strike, counterattack, combo, HP, prop, and burn-down states (`apps/web/tests/CombatPlaybackLayer.test.tsx`)

***

## Implementation (8 tasks)

* [x] T009 \[S2404] Create `CombatPlaybackLayer` as a pointer-events-none battlefield layer with product-facing labels only (`apps/web/src/components/battlefield/CombatPlaybackLayer.tsx`)
* [x] T010 \[S2404] Implement timer-managed transient strikes, counterattacks, and burn-down effects with cleanup on scope exit for all acquired resources (`apps/web/src/components/battlefield/CombatPlaybackLayer.tsx`)
* [x] T011 \[S2404] Implement reduced-motion static twins for HP ticks, last-strike badges, stage props, and razed state (`apps/web/src/components/battlefield/CombatPlaybackLayer.tsx`)
* [x] T012 \[S2404] Wire combat playback into `Battlefield` from `eventLog`, `missions`, `gameProjection.campLinks`, ranked camps, hero coordinates, hero names, and `reduceMotion` (`apps/web/src/components/battlefield/Battlefield.tsx`)
* [x] T013 \[S2404] Add joint-assault rendering with deterministic per-hero trims and visible caps for multiple linked missions on one camp (`apps/web/src/components/battlefield/CombatPlaybackLayer.tsx`)
* [x] T014 \[S2404] Integrate verified-kill burn-down with existing celebration visual constants while avoiding achievement or reward writes (`apps/web/src/components/battlefield/Battlefield.tsx`)
* [x] T015 \[S2404] Add combat playback CSS classes, keyframes, HP chip treatment, stage props, and reduced-motion overrides (`apps/web/src/index.css`)
* [x] T016 \[S2404] Preserve nonblocking layer order around hero tokens, remote overlays, and achievement bursts (`apps/web/src/components/battlefield/Battlefield.tsx`)

***

## Testing (6 tasks)

* [x] T017 \[S2404] \[P] Write pure tests for linked-only strikes, event classification, combo progression, stage props, HP drain, and verification-only kills (`apps/web/tests/combatPlaybackEffects.test.ts`)
* [x] T018 \[S2404] \[P] Write privacy and contract tests for unknown events, custom tools, hostile labels, unmatched verification, and no raw event data in output (`apps/web/tests/combatPlaybackEffects.test.ts`)
* [x] T019 \[S2404] \[P] Write component tests for visual caps, timer cleanup on unmount, reduced-motion twins, joint assault, and counterattack flashes (`apps/web/tests/CombatPlaybackLayer.test.tsx`)
* [x] T020 \[S2404] Write Battlefield integration tests for `mission_start`, linked `tool_use`, failed `tool_result`, and `task_verification` through `useGameStore.applyEvent` (`apps/web/tests/Battlefield.test.tsx`)
* [x] T021 \[S2404] Run focused automated checks for the new playback tests and battlefield integration (`npm test -- apps/web/tests/combatPlaybackEffects.test.ts apps/web/tests/CombatPlaybackLayer.test.tsx apps/web/tests/Battlefield.test.tsx`)
* [x] T022 \[S2404] Run web typecheck plus ASCII and LF validation for changed session files (`npm --workspace @factionos/web run typecheck`)

***

## 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` (next step in the implement -> creview -> validate sequence)

***

## Next Steps

Run the `implement` 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/specs/phase24-session04-combat-playback-effects-layer/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.
