Skip to content

feat(issue-templates): add issue template CRUD with template picker#69

Merged
furtherref merged 1 commit into
mainfrom
agent/ai-gpt/98dde0bc
May 24, 2026
Merged

feat(issue-templates): add issue template CRUD with template picker#69
furtherref merged 1 commit into
mainfrom
agent/ai-gpt/98dde0bc

Conversation

@furtherref
Copy link
Copy Markdown
Owner

Summary

  • Add issue template CRUD (create, read, update, delete) with Go backend handlers, sqlc queries, and migration 108
  • Add template picker in the create-issue modal — select a template to pre-fill title and description
  • Add issue template list page, detail page, and sidebar navigation for both web and desktop
  • Add search command integration for quick-navigating to issue templates
  • Harden the feature with response schemas (zod + parseWithFallback), config validation, atomic template apply with token guards, and upload generation tracking

Key design decisions

  • List/detail split: list endpoint omits issue_content to keep the picker payload bounded; detail is fetched on apply
  • Atomic apply: form is disabled during async template fetch; submit is blocked; stale responses are discarded via monotonic token
  • API response safety: zod schemas with empty fallbacks for desktop/backend version skew (per API Response Compatibility rules)
  • Config validation: server rejects non-object config to prevent list poisoning
  • Partial updates: detail page only sends changed fields to avoid overwriting concurrent edits

Test plan

  • Go handler tests: CRUD, list omits content, config validation (array/scalar rejected)
  • Schema tests: valid parse, null body fallback, malformed items fallback, nullable fields
  • Manual: create template, apply in create-issue modal, verify title/description populate
  • Manual: apply template over existing content (confirm overwrite dialog)
  • Manual: desktop app issue-templates route renders list and detail pages
  • Manual: search command navigates to issue templates

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
multica-web Ready Ready Preview, Comment May 24, 2026 1:19pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
multica-docs Ignored Ignored Preview May 24, 2026 1:19pm

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0937685b73

ℹ️ 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".

Comment thread packages/views/modals/create-issue.tsx
Comment thread packages/views/issue-templates/components/issue-template-detail-page.tsx Outdated
Comment thread packages/core/api/client.ts Outdated
Comment thread server/internal/handler/issue_template.go Outdated
Comment thread server/internal/handler/issue_template.go
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e68b0ac388

ℹ️ 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".

Comment thread server/internal/handler/issue_template_test.go Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7480970ded

ℹ️ 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".

Comment thread packages/core/paths/paths.ts
Comment thread packages/core/realtime/use-realtime-sync.ts
Comment thread packages/views/issue-templates/components/issue-templates-page.tsx
Comment thread packages/core/issue-templates/mutations.ts
Add issue template feature — workspace-scoped templates that pre-fill
title and description when creating issues.

Backend:
- Go handler with CRUD endpoints under /api/issue-templates
- sqlc queries: list (summaries without content), detail, create, update, delete
- Migration 108: issue_template table with workspace_id FK, unique(workspace_id, name)
- Config validation: reject non-object JSONB to prevent list poisoning
- Permission: owner/admin or template creator can update/delete

Frontend:
- Template picker in create-issue modal with overwrite confirmation dialog
- Issue templates list page with search, detail page with inline editing
- Sidebar navigation and search command integration for both web and desktop
- Desktop route wiring (list + detail pages)
- Zod schemas with parseWithFallback for API response drift safety
- Atomic template apply: form disabled during fetch, submit blocked,
  token-guarded async responses, upload generation tracking
- Partial update payload (only changed fields sent)
- ContentEditor.setMarkdown imperative method for template content injection

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@furtherref furtherref force-pushed the agent/ai-gpt/98dde0bc branch from 10147b0 to d6d4a76 Compare May 24, 2026 13:17
@furtherref furtherref merged commit 14de1c9 into main May 24, 2026
7 checks passed
@furtherref furtherref deleted the agent/ai-gpt/98dde0bc branch May 24, 2026 13:22
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.

1 participant