···288288 submit: Submit
289289responses:
290290 submissionsCount: "{count} submissions"
291291+ viewSubmissions: By submissions
292292+ viewQuestions: By questions
291293 backToBuilder: Back to builder
292294 noSubmissionsEyebrow: No submissions yet
293295 noSubmissionsTitle: Publish the form to start collecting responses.
294296 noSubmissionsDescription: Only published forms are available on the public route, and every respondent stays anonymous on submission.
297297+ noQuestionBlocksEyebrow: No answerable questions
298298+ noQuestionBlocksTitle: This form has no questions to summarize yet.
299299+ noQuestionBlocksDescription: Add at least one answerable block to review responses by question.
300300+ noAnswersYet: No answers yet for this question.
295301 openBuilder: Open builder
296302 submissionTitle: "Submission #{number} · {date}"
297303 answersCount: "{count} answers"
304304+ reachedCount: "Reached: {count}"
305305+ answeredCount: "Answered: {count}"
306306+ emptyCount: "No answer: {count}"
307307+ skippedCount: "Skipped by branching: {count}"
308308+ minValue: "Min: {value}"
309309+ maxValue: "Max: {value}"
310310+ averageValue: "Average: {value}"
311311+ answerList: Answers
298312 open: Open
299313responseDetail:
300314 title: "Submission #{number} · {date}"
+14
locales/ru.yml
···288288 submit: Отправить
289289responses:
290290 submissionsCount: "{count} ответов"
291291+ viewSubmissions: По ответам
292292+ viewQuestions: По вопросам
291293 backToBuilder: Назад к редактору
292294 noSubmissionsEyebrow: Пока нет ответов
293295 noSubmissionsTitle: Опубликуйте форму, чтобы начать собирать ответы.
294296 noSubmissionsDescription: Только опубликованные формы доступны по публичному URL, и каждый респондент остаётся анонимным при ответе.
297297+ noQuestionBlocksEyebrow: Нет вопросов для сводки
298298+ noQuestionBlocksTitle: В этой форме пока нет вопросов, которые можно суммировать.
299299+ noQuestionBlocksDescription: Добавьте хотя бы один блок с ответом, чтобы просматривать ответы по вопросам.
300300+ noAnswersYet: На этот вопрос пока нет ответов.
295301 openBuilder: Открыть редактор
296302 submissionTitle: "Ответ №{number} · {date}"
297303 answersCount: "{count} ответов"
304304+ reachedCount: "Дошли: {count}"
305305+ answeredCount: "Ответили: {count}"
306306+ emptyCount: "Без ответа: {count}"
307307+ skippedCount: "Пропущено ветвлением: {count}"
308308+ minValue: "Мин: {value}"
309309+ maxValue: "Макс: {value}"
310310+ averageValue: "Среднее: {value}"
311311+ answerList: Ответы
298312 open: Открыть
299313responseDetail:
300314 title: "Ответ №{number} · {date}"
···11+## Context
22+33+The current response review experience is organized around individual submissions. Creators can open the responses page, inspect each submission, and drill into a single response, but they cannot review a form question as a unit or understand answer patterns without manually scanning many submissions.
44+55+This project already stores enough data to support question-centric review. Each saved response includes `answersJson` plus a snapshot of the visited blocks for that submission, which means the system can distinguish between blocks that were visited, blocks skipped by branching, and blocks left unanswered while still preserving form-order context.
66+77+## Goals / Non-Goals
88+99+**Goals:**
1010+- Add a second responses-page mode for reviewing answers by question instead of only by submission.
1111+- Preserve the existing response list as the default mode so current workflows do not break.
1212+- Show lightweight aggregate stats for each answerable block using data already stored with submissions.
1313+- Respect branching so question-level summaries reflect only submissions that actually reached a given block.
1414+1515+**Non-Goals:**
1616+- Replacing the single-response detail page.
1717+- Building advanced analytics, charts, or cross-question reporting.
1818+- Adding new database tables, background jobs, or external analytics dependencies.
1919+- Changing export formats as part of this change.
2020+2121+## Decisions
2222+2323+### Decision: Keep both response-review modes on the existing responses page
2424+The responses page will expose a view switcher with two modes: the current submission list and a new question-centric list. Submission view remains the default.
2525+2626+**Rationale:** This keeps response review in one place, avoids fragmenting navigation, and lets creators switch mental models without leaving the form context.
2727+2828+**Alternatives considered:**
2929+- Separate question analytics page: rejected because it adds navigation overhead and duplicates page structure.
3030+- Replacing the current list with question view: rejected because creators still need respondent-by-respondent inspection.
3131+3232+### Decision: Aggregate question summaries server-side from saved response data
3333+Question-level summaries will be computed in server code from the form blocks, each response's `answersJson`, and each response's saved visited-block snapshot.
3434+3535+**Rationale:** The required data already exists, so server-side aggregation avoids schema changes and keeps branching semantics consistent with the saved submission route.
3636+3737+**Alternatives considered:**
3838+- Client-side aggregation from raw response payloads: rejected because it would push too much data-shaping logic into the UI.
3939+- Precomputed database aggregates: rejected because the data volume does not justify added write-time complexity yet.
4040+4141+### Decision: Scope question summaries to answerable blocks only
4242+The question-centric view will exclude text-only blocks and summarize only blocks that can receive answers.
4343+4444+**Rationale:** Text blocks are context, not questions. Including them in the question list would add noise and weaken the usefulness of the view.
4545+4646+**Alternatives considered:**
4747+- Showing all blocks including text sections: rejected because it makes question review harder to scan.
4848+4949+### Decision: Use type-specific lightweight summaries
5050+Each question block type will expose a summary shape that fits the data:
5151+- single choice / agreement: per-option counts
5252+- multiple choice: per-option counts across submissions
5353+- number: answered count plus min, max, and average
5454+- short text / long text / link / date: answered count plus a list of submitted answers
5555+5656+Each summary will also track high-level participation counts such as reached, answered, and skipped-by-branching where possible.
5757+5858+**Rationale:** Creators want quick insight first, not full analytics infrastructure. Type-specific summaries provide immediate value while staying implementable within the existing response-review stack.
5959+6060+**Alternatives considered:**
6161+- One generic summary format for every block: rejected because it would be too weak for numeric and choice questions.
6262+- Full charts and advanced analytics: rejected as out of scope for this change.
6363+6464+## Risks / Trade-offs
6565+6666+- [Large text-answer volumes may make question view heavy] → Start with a simple list and keep the view server-rendered; add truncation or pagination later if real usage demands it.
6767+- [Aggregating from saved response snapshots may increase page load cost on forms with many responses] → Keep the first version simple and use one aggregation pass over responses; revisit optimization only if performance becomes an issue.
6868+- [Branching semantics can be confusing when a question was never reached] → Explicitly distinguish reached, answered, and skipped-by-branching counts in the summary model.
6969+- [Different block types need different summary UI] → Centralize summary shaping in server-side helpers so rendering stays predictable and testable.
7070+7171+## Migration Plan
7272+7373+No database migration is required. Deploy as an additive UI and server-data change. If the new question view causes issues, fallback is straightforward: hide the view switcher and stop rendering the aggregated data path while keeping the existing submission review intact.
7474+7575+## Open Questions
7676+7777+- Should free-text style questions show the full answer list immediately or a limited preview with a “show more” affordance?
7878+- Do we want the selected response-review mode to persist per user or form, or is per-page default state sufficient for the first release?
···11+## Why
22+33+Creators can currently review submissions only as a response-by-response list. That works for inspecting individual respondents, but it makes it hard to answer question-level product questions such as which options are selected most often, how many respondents skipped an optional question, or what the overall distribution of answers looks like.
44+55+## What Changes
66+77+- Add a second responses view that organizes data by question instead of by submission.
88+- Keep the existing response list as one of the available views so creators can continue reviewing individual submissions.
99+- Show per-question answer summaries and lightweight stats that match the block type, such as choice counts, answer totals, and completion or empty-state counts where relevant.
1010+- Let creators drill into the answers for a selected question from the question-centric view.
1111+1212+## Capabilities
1313+1414+### New Capabilities
1515+<!-- None. -->
1616+1717+### Modified Capabilities
1818+- `response-review`: expand response review from submission-only inspection to include question-centric review and aggregate answer summaries.
1919+2020+## Impact
2121+2222+- Affected areas: responses page UI, response review data shaping, localized copy, and metadata for the responses experience.
2323+- Likely code changes in `app/(creator)/forms/[id]/responses/page.tsx`, response review components, and `lib/forms.ts` aggregation helpers.
2424+- No new external dependencies expected.
···11+## ADDED Requirements
22+33+### Requirement: Creator can switch response review between submissions and questions
44+The system SHALL allow an authenticated creator to switch the responses page for an accessible form between a submission-centric list and a question-centric list while keeping submission review as the default mode.
55+66+#### Scenario: Creator opens responses for a form
77+- **WHEN** an authenticated creator opens the responses view for a form they can access
88+- **THEN** the system shows the submission-centric list by default and offers a control to switch to question-centric review
99+1010+#### Scenario: Creator switches to question-centric review
1111+- **WHEN** an authenticated creator selects the question-centric responses mode
1212+- **THEN** the system shows answerable form blocks in form order instead of individual submissions
1313+1414+#### Scenario: Creator switches back to submission review
1515+- **WHEN** an authenticated creator returns to the submission-centric responses mode after viewing question-centric review
1616+- **THEN** the system shows the existing submission list again
1717+1818+### Requirement: Creator can inspect aggregate answers for a question
1919+The system SHALL allow an authenticated creator to inspect a question-level summary for each answerable block using stored submissions that reached that block.
2020+2121+#### Scenario: Creator reviews a choice question
2222+- **WHEN** an authenticated creator views a single-choice, multiple-choice, or agreement block in question-centric review
2323+- **THEN** the system shows aggregate counts for the available answer options based on submissions that reached that block
2424+2525+#### Scenario: Creator reviews a numeric question
2626+- **WHEN** an authenticated creator views a number block in question-centric review
2727+- **THEN** the system shows aggregate numeric summary information derived from submitted answers for that block
2828+2929+#### Scenario: Creator reviews a freeform answer question
3030+- **WHEN** an authenticated creator views a short text, long text, link, or date block in question-centric review
3131+- **THEN** the system shows the submitted answers for that block together with summary counts for answered responses
3232+3333+#### Scenario: Creator reviews a branched question
3434+- **WHEN** an authenticated creator views a question that is skipped for some submissions because of branching
3535+- **THEN** the system distinguishes submissions that reached the block from submissions that skipped it by route
3636+3737+#### Scenario: Creator reviews a question with no submitted answers
3838+- **WHEN** an authenticated creator views a question that has no answers yet
3939+- **THEN** the system shows an empty summary state for that question instead of failing or hiding the block
···11+## 1. Response review data shaping
22+33+- [x] 1.1 Add server-side response review helpers that aggregate question-level summaries from stored answers and visited-block snapshots
44+- [x] 1.2 Extend the responses page data payload to return both submission-centric data and question-centric summary data for answerable blocks
55+- [x] 1.3 Cover branching-aware aggregation cases such as reached, answered, skipped-by-branching, and empty-answer states
66+77+## 2. Responses page UI
88+99+- [x] 2.1 Add a view switcher on the responses page for submission-centric and question-centric review modes
1010+- [x] 2.2 Keep the existing submission list behavior intact as the default mode
1111+- [x] 2.3 Implement the question-centric list UI in form order with type-specific summary rendering for choice, numeric, and freeform blocks
1212+1313+## 3. Copy, metadata, and validation
1414+1515+- [x] 3.1 Add localized labels and empty states for the new response review mode and per-question summaries
1616+- [x] 3.2 Update responses-page metadata and supporting presentation details to reflect the new review experience
1717+- [x] 3.3 Verify the new view against forms with no responses, optional questions, and branched routes