> For the complete documentation index, see [llms.txt](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/sessions/phase40-session12-compact-and-chat-polish/tasks.md).

# Task Checklist

**Session ID**: `phase40-session12-compact-and-chat-polish` **Total Tasks**: 21 **Estimated Duration**: 3-4 hours **Created**: 2026-07-03

***

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

***

## Setup (2 tasks)

* [x] T001 \[S4012] Verify existing chat state, transcript helper, selector, and composer contracts before edits (`src/components/hermes/chat/hermes-chat-tab.tsx`, `src/hooks/use-hermes-admin.ts`, `src/components/hermes/chat/chat-composer.tsx`)
* [x] T002 \[S4012] Add or refresh test harness fixtures for transcript compact results, clipboard behavior, and timer control (`src/components/hermes/chat/__tests__/hermes-chat-tab.test.tsx`)

***

## Foundation (4 tasks)

* [x] T003 \[S4012] \[P] Add compact prompt, carryover message, and startup-warning filter helpers with declared edge cases (`src/components/hermes/chat/chat-types.ts`)
* [x] T004 \[S4012] \[P] Add assistant reply copy state and accessible feedback scaffolding with unavailable-clipboard handling (`src/components/hermes/chat/chat-message-list.tsx`)
* [x] T005 \[S4012] \[P] Add elapsed thinking state scaffolding with cleanup on scope exit for all interval resources (`src/components/hermes/chat/chat-message-list.tsx`)
* [x] T006 \[S4012] Add compact action props and stable action-row placement without disturbing selector/context toolbar layout (`src/components/hermes/chat/chat-composer.tsx`)

***

## Implementation (9 tasks)

* [x] T007 \[S4012] Implement compact summary requests through `sendPromptForTranscript` with duplicate-trigger prevention while in-flight (`src/components/hermes/chat/hermes-chat-tab.tsx`)
* [x] T008 \[S4012] Merge compact summary requests with the selected ordinary or MoA model options and existing grounding behavior without mutating Hermes config (`src/components/hermes/chat/hermes-chat-tab.tsx`, `src/components/hermes/chat/chat-types.ts`)
* [x] T009 \[S4012] Seed the successful compact summary as a visible carryover assistant message bound to the current local chat instance (`src/components/hermes/chat/hermes-chat-tab.tsx`)
* [x] T010 \[S4012] Clear stale carryover on new chat, selected-thread load, reset, cancel, demo/live changes, and compact failure paths with state reset or revalidation on re-entry (`src/components/hermes/chat/hermes-chat-tab.tsx`)
* [x] T011 \[S4012] Wire the compact button disabled, pending, success, and failure states into the composer with product-facing copy only (`src/components/hermes/chat/chat-composer.tsx`)
* [x] T012 \[S4012] Render assistant and streamed reply copy buttons with platform-appropriate accessibility labels, focus behavior, and input support (`src/components/hermes/chat/chat-message-list.tsx`)
* [x] T013 \[S4012] Apply the narrowed startup-warning filter to rendered assistant/thread/stream content while preserving legitimate `Warning:` replies (`src/components/hermes/chat/chat-message-list.tsx`, `src/components/hermes/chat/chat-types.ts`)
* [x] T014 \[S4012] Show "Hermes is thinking" elapsed copy before first output with stable dimensions and cleanup when output, cancel, reset, or unmount occurs (`src/components/hermes/chat/chat-message-list.tsx`)
* [x] T015 \[S4012] Preserve Hermes Intelligence naming and avoid new Voice labels in non-speech chat controls (`src/components/hermes/chat/hermes-chat-tab.tsx`, `src/components/hermes/intelligence/intelligence-portal.tsx`)

***

## Testing (6 tasks)

* [x] T016 \[S4012] Test compact success, selected model/MoA option forwarding, and visible carryover creation (`src/components/hermes/chat/__tests__/hermes-chat-tab.test.tsx`)
* [x] T017 \[S4012] Test compact failure, abort, duplicate-trigger prevention, and carryover isolation across selected sessions and new chats (`src/components/hermes/chat/__tests__/hermes-chat-tab.test.tsx`)
* [x] T018 \[S4012] \[P] Test assistant reply copy rendering, clipboard success, clipboard failure, and unavailable clipboard behavior (`src/components/hermes/chat/__tests__/hermes-chat-tab.test.tsx`)
* [x] T019 \[S4012] \[P] Test elapsed thinking state with fake timers and cleanup on output/cancel/reset/unmount (`src/components/hermes/chat/__tests__/hermes-chat-tab.test.tsx`)
* [x] T020 \[S4012] \[P] Test startup-warning filtering, legitimate `Warning:` preservation, and Hermes Intelligence label boundaries (`src/components/hermes/chat/__tests__/hermes-chat-tab.test.tsx`)
* [x] T021 \[S4012] Run focused checks and ASCII/LF validation for touched files (`bun run test -- src/components/hermes/chat/__tests__/hermes-chat-tab.test.tsx src/hooks/__tests__/use-hermes-admin.test.tsx`, `bun run typecheck`, `perl -ne 'exit 1 if /[^\x00-\x7F]/' .spec_system/specs/phase40-session12-compact-and-chat-polish/spec.md .spec_system/specs/phase40-session12-compact-and-chat-polish/tasks.md`)

***

## 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 `creview` 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://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/sessions/phase40-session12-compact-and-chat-polish/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.
