Skip to content

fix(agents): address inline task prompts code review findings#595

Merged
zbigniewsobiecki merged 2 commits intodevfrom
fix/inline-task-prompts-review
Mar 1, 2026
Merged

fix(agents): address inline task prompts code review findings#595
zbigniewsobiecki merged 2 commits intodevfrom
fix/inline-task-prompts-review

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

This PR addresses all critical, high, and moderate issues identified in the inline task prompts implementation code review.

Phase 1 - Critical Backend Fixes

  • Add missing AgentInput fields (triggerCommentBody, triggerCommentPath) for PR comment triggers
  • Create unified buildTaskPromptContext() in prompts/index.ts with consistent null handling
  • Fix modelResolution.ts to use renderInlineTaskPrompt() instead of renderCustomPrompt()
  • Add schema validation requiring prompts.taskPrompt (PromptsSchema no longer optional)
  • Add early Eta syntax validation in profile builder to catch errors at build time

Phase 2 - Dashboard Fixes

  • Fix save logic to always send both prompts (prevents losing inactive section)
  • Fix reset button: rename to "Reset All Prompts" and add confirmation dialog
  • Show variable descriptions in ReferencePanel
  • Add loading/error states in PromptsPanel
  • Refactor PromptsPanel to reduce cognitive complexity (extract helper components)

Phase 3 - Consistency Cleanup

  • Standardize YAML taskPrompt format to pipe style (debug, planning, splitting, implementation)
  • Remove unnecessary dbPartials size check in getSystemPrompt() and renderInlineTaskPrompt()
  • Add placeholder text for system prompt textarea

Test plan

  • npm run typecheck - verify type safety improvements
  • npm test - verify no regressions (all 3621 tests pass)
  • npm run lint - verify no lint warnings
  • Manual dashboard test:
    • Edit system prompt, verify task prompt preserved on save
    • Edit task prompt, verify system prompt preserved on save
    • Click Reset, verify confirmation appears
    • Verify variable descriptions show in reference panel

🤖 Generated with Claude Code

zbigniewsobiecki and others added 2 commits March 1, 2026 18:00
Phase 1 - Critical Backend Fixes:
- Add missing AgentInput fields (triggerCommentBody, triggerCommentPath) for PR comment triggers
- Create unified buildTaskPromptContext() in prompts/index.ts with consistent null handling
- Fix modelResolution.ts to use renderInlineTaskPrompt() instead of renderCustomPrompt()
- Add schema validation requiring prompts.taskPrompt (PromptsSchema no longer optional)
- Add early Eta syntax validation in profile builder to catch errors at build time

Phase 2 - Dashboard Fixes:
- Fix save logic to always send both prompts (prevents losing inactive section)
- Fix reset button: rename to "Reset All Prompts" and add confirmation dialog
- Show variable descriptions in ReferencePanel
- Add loading/error states in PromptsPanel
- Refactor PromptsPanel to reduce cognitive complexity (extract helper components)

Phase 3 - Consistency Cleanup:
- Standardize YAML taskPrompt format to pipe style (debug, planning, splitting, implementation)
- Remove unnecessary dbPartials size check in getSystemPrompt() and renderInlineTaskPrompt()
- Add placeholder text for system prompt textarea

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…YAML)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit 094725b into dev Mar 1, 2026
6 checks passed
@zbigniewsobiecki zbigniewsobiecki deleted the fix/inline-task-prompts-review branch March 16, 2026 16:43
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