Add reusable development seed dataset - #167
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019fa9fa-a0a9-7607-b551-df57797d3054 Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9192c02e10
ℹ️ 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".
| def seed_plan_types | ||
| PLAN_TYPES.index_with do |attributes| | ||
| PlanType.find_or_initialize_by(name: attributes.fetch(:name)).tap do |plan_type| | ||
| plan_type.assign_attributes(attributes) |
There was a problem hiding this comment.
Preserve customized plan-type attributes when reseeding
When an existing installation has customized one of the built-in plan types, every db:seed run overwrites its description, icon, and default tags via assign_attributes; for example, an ADR type with the previous adr default tag is silently changed to architecture. Use create-only defaults or update only blank fields so rerunning seeds remains non-destructive.
AGENTS.md reference: AGENTS.md:L104-L107
Useful? React with 👍 / 👎.
| plans = seed_documents(users, plan_types) | ||
| seed_shared_library_examples(users, plans) |
There was a problem hiding this comment.
Restore review threads in the demo seed
On a fresh database, this call sequence creates documents and placements but no comments or comment threads; a repo-wide search of db/seeds* finds no other creation path. Because this commit removes the previous seeded threads, the central inline review, triage, highlight, and popover flows can no longer be demonstrated after the documented setup procedure.
AGENTS.md reference: AGENTS.md:L104-L107
Useful? React with 👍 / 👎.
Amp-Thread-ID: https://ampcode.com/threads/T-019faa2f-4e22-737a-ac6c-bab5fb9c5602 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019faa2f-4e22-737a-ac6c-bab5fb9c5602 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019fa9fa-a0a9-7607-b551-df57797d3054