Skip to content

[Phase A1] Refactor interview UI to chat-style transcript with editable past answers #17

@terisuke

Description

@terisuke

Tracked under ADR 0002 — Phase A. Implementation detail: docs/implementation-plans/multi-persona-multi-format.md.

Problem

The current interview surfaces one question at a time but renders the conversation inside a max-height: 340px scroll-locked div (static/css/style.css:273). Past answers are not clickable, not editable, and not visually grouped with their parent fixed question. There is no way to fork the session if the user realises an earlier answer should be revised — the only escape is to start a fresh session, losing accumulated context.

This blocks the "feels like Claude/ChatGPT" comparison the project owner wants.

Scope

  • Replace the bounded question-log div with a full-height scrolling transcript pinned to the centre column.
  • Render every BriefAnswer as a clickable bubble; clicking opens an inline edit affordance.
  • Editing an answer creates a new session that forks at that answer (server: POST /api/sessions/{id}/answers/{answer_id}/edit, returns the new session_id and parent_session_id). The original session is retained.
  • Deep-dive question bubbles render visually nested under their parent fixed question, with the parent answer quoted as context.
  • Keyboard: recalls the previous unsubmitted answer; Cmd/Ctrl+Enter submits.
  • Question bubbles left-aligned, answers right-aligned (familiar chat metaphor).

Acceptance criteria

  • Editing answer feat: CI/CDパイプラインの設定を追加 #2 in a 5-answer session produces a new session whose answer list is [1, 2', …].
  • The original session is reachable from the new session via parent_session_id.
  • Keyboard shortcuts work without breaking textarea newline insertion.
  • Deep-dive bubbles visually attach to their parent fixed question.
  • Existing scenario tests still pass; no domain or application layer changes required for this issue.

Out of scope

  • Streaming (covered by Phase A2).
  • Editable draft preview (covered by Phase A3).
  • Persona switching (Phase B / C).

Files likely touched

  • static/index.html
  • static/js/script.js
  • static/css/style.css
  • internal/handlers/workflow.go (new fork-on-edit endpoint)
  • internal/application/brief/service.go (fork-on-edit logic)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions