Skip to content

Enhance TaskForm and related components to support linked content typ… - #289

Merged
tenkus47 merged 6 commits into
devfrom
add-group-accumulation-and-collection-in-subtask
Sep 11, 2026
Merged

Enhance TaskForm and related components to support linked content typ…#289
tenkus47 merged 6 commits into
devfrom
add-group-accumulation-and-collection-in-subtask

Conversation

@tenkus47

Copy link
Copy Markdown
Member

…es. Add tests for linked subtasks, including event and post types. Update ContentTypeSelector to handle new linked content options and ensure proper rendering in TaskView and SubTaskCard.

…es. Add tests for linked subtasks, including event and post types. Update ContentTypeSelector to handle new linked content options and ensure proper rendering in TaskView and SubTaskCard.
…y. Adjust formatting in TaskForm, ContentTypeSelector, and LinkedContent components, ensuring better alignment and clarity in code structure.
@greptile-apps

greptile-apps Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable correctness, security, or repository-rule violations remain.

Findings

  1. P2 Payload Type Omits Reference
Fix with agent prompt
### Issue 1
src/components/routes/task/components/view/TaskForm.tsx:103-105
The create and update payloads now send `reference_id`, but `SubTaskPayload` does not declare this field. This leaves the API type out of sync with the data being sent, so future typed payload construction or refactoring could silently drop linked references. Add `reference_id?: string | null` to the payload type and cover the create path as well as the update path.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

  • Adds group-scoped linked-content selection with pagination, search, previews, and missing-reference states.
  • Centralizes create and update subtask payload construction so linked references and timestamp fields remain consistent.
  • Adds event chat enablement to event forms, API payloads, detail status, schema defaults, and tests.
  • Displays event schedules consistently and annotates prayer requests and event-chat reports.
  • Adds focused tests for linked subtasks, event recurrence conversion, schedule formatting, and event-chat mapping.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Task form] --> B[Choose linked content type]
  B --> C[Load content from plan group]
  C --> D[Select accumulation, collection, event, or post]
  D --> E[Create linked subtask with reference_id]
  E --> F[Build create or update payload]
  F --> G[Task API]
  G --> H[Resolved reference returned on read]
  H --> I[TaskView and SubTaskCard preview]
Loading

Reviews (4) · Last reviewed commit: "Enhance ChatReportsPage and related comp..."

Comment on lines +103 to +105
...(isLinkedSubTask(subTask) && {
reference_id: subTask.reference_id || null,
}),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Payload Type Omits Reference

The create and update payloads now send reference_id, but SubTaskPayload does not declare this field. This leaves the API type out of sync with the data being sent, so future typed payload construction or refactoring could silently drop linked references. Add reference_id?: string | null to the payload type and cover the create path as well as the update path.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/routes/task/components/view/TaskForm.tsx
Line: 103-105

Comment:
**Payload Type Omits Reference**

The create and update payloads now send `reference_id`, but `SubTaskPayload` does not declare this field. This leaves the API type out of sync with the data being sent, so future typed payload construction or refactoring could silently drop linked references. Add `reference_id?: string | null` to the payload type and cover the create path as well as the update path.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

…inked content types. Refactor subtask payload construction for improved clarity and maintainability. Update linked content fetcher to only retrieve published posts, ensuring better user experience.
@tenkus47
tenkus47 requested a review from Tech-lo September 11, 2026 09:06
…te display. Replace date formatting functions with a new schedule formatting utility. Update event recurrence handling and enhance test coverage for event recurrence logic.
…ating import statements. This change enhances code clarity without altering functionality.
… types and chat room states. Add conditional rendering for prayer requests and improve room name display logic. Update API and schema to include chat-related fields for better event management.
@tenkus47
tenkus47 merged commit ee06438 into dev Sep 11, 2026
4 checks passed
@tenkus47
tenkus47 deleted the add-group-accumulation-and-collection-in-subtask branch September 11, 2026 12:51
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.

2 participants