Skip to content

TSA-506: Preset description editing - #507

Merged
NabuhotniRoman merged 6 commits into
mainfrom
feat/TSA-506-preset-description
Sep 28, 2026
Merged

NabuhotniRoman merged 6 commits into
mainfrom
feat/TSA-506-preset-description

Conversation

@RomanNabukhotniidev

Copy link
Copy Markdown
Collaborator

Closes #506

A preset has always had a description, but there was no way for a user to write one. It is set by hand in the seed migrations for the four built-in presets, and NOT NULL DEFAULT '' in the schema, so anything a user creates keeps an empty one forever. Once the Presets list landed, that became visible: a user-made preset reads "No description" and nothing can change it.

What I found while doing it

Adding the input was not enough. GET /presets/:id never returned description, so when you opened a preset to edit it there was nothing to prefill the field from - you would have silently wiped the description every time you saved a new version. So the field is now carried through the details DTO, the entity and the repository select as well.

Changes

  • GET /presets/:id returns description.
  • An optional Description input in the editor, under Name, prefilled from the base preset and sent in the create payload. No backend work was needed for saving: POST /presets already accepted the field and validated it at 2000 characters.
  • The Presets list renders an empty description as nothing instead of the "No description" placeholder.
  • design/prompts.md: the Stage 8 mockup and the spec now include the field, so the design and the code say the same thing.

Tested against the local backend

  • GET /presets/1 returns the seeded description.
  • Creating with a description persists it; creating without one stores ''.
  • Opening an existing preset returns its description, and saving a new version with a changed one writes the new text.
  • A description over 2000 characters is rejected with Validation failed.
  • Glossary note values survive the round trip.
  • The list returns all three cases correctly, including the empty one.

tsc --noEmit and eslint --max-warnings=0 are clean.

Note on scope

This was listed in #271 ("edits text fields: name, description, instructions, seed glossary") and ticked there, but the editor never had the field - the implementation followed the design, which omitted it. #271 has been narrowed and this is split out, with the design updated to match rather than left to diverge again.

🤖 Generated with Claude Code

A preset has a description, but nobody could write one: it was set by hand in
the seed migrations and left empty forever on anything a user made, while the
Presets list showed "No description" with no way to change that.

- GET /presets/:id now returns description; without it the editor had nothing
  to prefill the field from
- an optional Description input in the editor, under Name, carried into the
  create payload
- the list renders an empty description as nothing, not a placeholder
- design: the Stage 8 mockup and spec now include the field
@RomanNabukhotniidev RomanNabukhotniidev added frontend Frontend application backend Backend application feature New feature (auto-applied by the feature template) labels Sep 28, 2026
@RomanNabukhotniidev RomanNabukhotniidev self-assigned this Sep 28, 2026
Both preset screens sat flush against the left edge while every other page
centres its content: the document page uses a max-width column with auto
margins, the presets list had no max-width at all, and the editor had one but
no auto margins, so it never moved off the left.

Both now match the document page: a full-width header with its rule, and a
centred column under it, capped at the 960px the editor already used.
The container was centred at 960px but the card inside it caps at 720px with
no auto margins, so all 240px of slack sat on the right and the form stood
120px left of centre.
@NabuhotniRoman
NabuhotniRoman merged commit e1d3796 into main Sep 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend application feature New feature (auto-applied by the feature template) frontend Frontend application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FE] Preset description: decide whether users can edit it, and stop showing the placeholder

3 participants