Repository navigation
docs(mypolitics): questionnaire specs and tasks - #85
Conversation
Seventeen specs for the questionnaire view, written from the docs under modules/quiz/questionnaire and the frames they link: session and data, answer model, phases model, progress and pacing, demographics, results saving and marketing, the results calculation loader, the checkpoint event model, the shared checkpoint card, the copy pools and the seven checkpoint cards. - New doc: questionnaire/session-and-data.md - nothing described where a quiz comes from, what a session is and what is submitted, and a spec may only follow a doc. - Two broken doc links fixed (no-cross-device-resume, halfway-split). - universal-axis.md: no value labels on checkpoint cards, and the masked state of the single axis puzzle. - spec/quiz/README.md and the questionnaire README list the new files. Every doc in scope is still an idea; each spec lists the calls it made where the docs, the frames and the API disagree, and what each costs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fifteen tasks under tasks/epics/survey, cycles 3 to 10, cut from the questionnaire specs: the survey API layer, the session, the questionnaire screen and route, e-mail capture, the results calculation loader, the running state, the checkpoint engine with its copy pools, the shared checkpoint card and the seven cards. - cycle-1/survey-newsletter.md and cycle-2/survey-questionnaire.md are removed: they describe the myPolitics 1.0 flow and their issues (#35, #36) were closed as deprecated. survey-email-capture and the new survey-questionnaire replace them. - double-axis-puzzle spec: a hit without an image draws the cap in the band colour, which is what the shared bar can do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fifteen tasks are published as sub-issues of [Epic] Survey (gi-org-pl/mypolitics-app#29), issues #100 to #114. Each task now names its branch with its issue number and its dependencies by issue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0da8a8b0c2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export const readCheckpointRecord = (stored: SurveyCheckpointRecord): CheckpointRecord => ... | ||
| // The session's record with its cards checked. An item of `cardsShown` is kept when it holds a card with a known | ||
| // `type`, a whole-number `boundary` and a `line` that exists in the pools; any other item is dropped. Never throws. |
There was a problem hiding this comment.
Validate complete checkpoint payloads when restoring records
Validate every card's discriminated payload before narrowing stored JSON to CheckpointRecord. As specified, a persisted item such as an axis-closeness card with a valid type, boundary, and pool line but missing axisId, start, or end is retained as a fully typed card; after a reload the checkpoint registry can then render it and dereference absent fields instead of dropping it and advancing to the next question. This also lets malformed cards affect pacing and duplicate suppression. The reader should validate the required fields and compatible line pool for each card variant.
Useful? React with 👍 / 👎.
Brings in the questionnaire specs and tasks (#85). universal-axis.md was changed on both sides and merged without conflicts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
The questionnaire (survey) view, taken from docs to specs to tasks in one pass. The specs were approved in advance by Adrian; the review stop of the concept-to-task skill was waived on his instruction.
docs/modules/quiz/questionnaire/session-and-data.md. Nothing described where a quiz comes from, what a session is, what is submitted and what survives a refresh, and a spec may only follow a doc.spec/quiz/:session-and-data,answer-model,phases-model,progress-and-pacing,demographics,results-saving-and-marketing,engaging-loader,event-model,checkpoints,checkpoints-random-copy,halfway-through,axis-closeness,new-trait,stats-chart,single-axis-puzzle,double-axis-puzzle,nolan-chart-path.tasks/epics/survey/cycle-3tocycle-10, published as sub-issues of [Epic] Survey: SurveyApi mypolitics-app#100 to docs(mypolitics): park legacy content migration as an idea #114.cycle-1/survey-newsletter.mdandcycle-2/survey-questionnaire.mddescribed the 1.0 flow; their issues ([Przenoszenie quizów] Eurowyborczy 2024 #35, [Przenoszenie quizów] Warszawski Radar Wyborczy #36) were closed as deprecated with "a new task will be created".survey-email-capture(Łukasz Kałużny - Front-end repository #103) and the newsurvey-questionnaire(Łukasz Kałużny - Back-end repository #102) are those tasks.no-cross-device-resume,halfway-split);universal-axis.mdgains "no value labels on checkpoint cards" and the masked state of the single axis puzzle; the two READMEs list the new files.Read this before approving
Every doc in scope is still
⚪ idea; no Decision line was changed (the result-module specs were written the same way). The docs, the Figma frames, the legacy app and the live API disagree in a dozen places. Each was decided, and each spec lists its calls with what they cost. The ones that change what the taker gets:prioritizedCategories), does not cut the question listmp-qu-2025-1.0.1Three things cannot run with today's data, and the tasks say so:
Axis closeness and the axis puzzle run only in the three identity-quiz versions: 11 of the 14 live surveys send no axes.
Not in this PR
Short results card and the results screen (results module), post-survey module (roadmap 4.2), any back-end work.
results/module-statistics.mdis still an empty template.Checks
mkdocs build --strictstops on six warnings, all in files this PR does not touch (links toeditor/README.md,platform/frontend-reimplementation.md,spec/platform/accounts.md). Not fixed here.main, so those links in the issues are dead until this PR is merged.🤖 Generated with Claude Code