Skip to content

feat(responses): let organizers correct submitted text - #85

Merged
patriksimms merged 4 commits into
mainfrom
feat/edit-closed-responses
Aug 24, 2026
Merged

feat(responses): let organizers correct submitted text#85
patriksimms merged 4 commits into
mainfrom
feat/edit-closed-responses

Conversation

@patriksimms

Copy link
Copy Markdown
Owner

Problem

Organizers cannot correct a typo after a contributor submits a response. The only available copy remains read-only, even after collection closes.

Solution

Closed, unarchived projects now let any signed-in organizer edit text answers for one response. Each save requires a danger confirmation, keeps the original and replacement values with the organizer identity and timestamp, and marks a generated book stale. Choice and image answers remain read-only.

Optimistic response revisions reject concurrent edits instead of silently overwriting another organizer’s correction.

Validation

  • direnv exec . env SAKEKEEP_E2E_PORT=3020 bun run verify
  • 319 unit and integration tests passed
  • 22 end-to-end tests passed, with 2 expected skips
  • production build and Compose checks passed
  • local browser journey verified against the seeded closed project

Visual evidence

Before: submitted responses are read-only

Read-only response before the change

After: explicit danger confirmation

Danger confirmation before saving

After: corrected response with visible history

Edited response and audit history

Closes #81

Implemented with Codex in T3 Code using openai/gpt-5.6-sol.

Summary:
- edit text answers on closed, unarchived responses behind a danger dialog
- retain organizer-attributed old and new values in visible edit history
- reject stale or invalid updates and mark generated books stale

Rationale:
- organizers need a safe way to correct contributor typos without hiding
  changes to submitted content
- append-only history and optimistic revisions keep corrections accountable
  when multiple organizers share the workspace

Tests:
- direnv exec . env SAKEKEEP_E2E_PORT=3020 bun run verify
- manual local browser check with matched screenshots

Related to #81

AI-Assisted: true
AI-Agent: codex
AI-Model: openai/gpt-5.6-sol
Comment thread src/components/submissions-panel.tsx
Comment thread src/components/submissions-panel.tsx
Pin the response revision and original text answers when an organizer starts
editing so a refresh cannot silently adopt a newer revision. Label blank values
in the audit trail so additions and removals remain understandable.

Tests: bun run lint
Tests: bun run typecheck
Tests: bun run test -- src/components/submissions-panel.test.tsx src/server/repository.integration.test.ts

Related to #81

AI-Assisted: true
AI-Agent: codex
AI-Model: openai/gpt-5.6-sol
End only stale edit sessions after a revision conflict so organizers can
refresh and begin again without repeatedly submitting the obsolete revision.
Keep drafts intact for unrelated save failures.

Tests: bun run lint
Tests: bun run typecheck
Tests: bun run test -- src/components/submissions-panel.test.tsx src/server/repository.integration.test.ts

Related to #81

AI-Assisted: true
AI-Agent: codex
AI-Model: openai/gpt-5.6-sol
@patriksimms
patriksimms marked this pull request as ready for review August 24, 2026 20:15
Merge the latest main branch into the response editing work. Load response
edit history and photo focal points together, update the new photo-focus test
fixtures for response revisions, and regenerate the response-edit migration
after the photo-focus migration.

Tests: bun run verify
Tests: fresh local migration chain through db:migrate

Related to #81

AI-Assisted: true
AI-Agent: codex
AI-Model: openai/gpt-5.6-sol
@patriksimms
patriksimms merged commit 82c7d03 into main Aug 24, 2026
3 checks passed
@patriksimms
patriksimms deleted the feat/edit-closed-responses branch August 24, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(responses): Let organizers correct submitted text

1 participant