Skip to content

feat: drafts workspace implementation#72

Merged
nazarli-shabnam merged 9 commits intomainfrom
56-drafts-workspace-implementation
Mar 26, 2026
Merged

feat: drafts workspace implementation#72
nazarli-shabnam merged 9 commits intomainfrom
56-drafts-workspace-implementation

Conversation

@nazarli-shabnam
Copy link
Copy Markdown
Member

@nazarli-shabnam nazarli-shabnam commented Mar 25, 2026

closes #56
This pull request introduces a new "draft work item" (draft issue) feature across the backend and frontend, allowing users to create, update, and list draft issues at the workspace level. It also adds a rich text editor for page descriptions and improves type coverage and flexibility in the UI. The most important changes are grouped below.


Draft Issue (Work Item) Feature:

  • Added support for creating and updating issues as drafts by introducing an is_draft field in both backend (Issue model, API, and service/store layers) and frontend request types. This enables users to save work items as drafts before publishing. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]

  • Implemented a new API endpoint (GET /api/workspaces/:slug/draft-issues/) to list all draft issues across projects in a workspace. The backend includes access checks and aggregates assignees, labels, cycles, and modules for each draft issue. [1] [2] [3] [4]

Frontend UI Enhancements:

  • Updated the CreateWorkItemModal component to support a "draft only" mode, which adjusts the UI and request payload to create draft work items, and changes the modal title accordingly. [1] [2] [3] [4] [5]

  • Improved the Dropdown component to accept a disabled prop, allowing dropdown triggers to be programmatically disabled in the UI. [1] [2] [3]

Rich Text Editor for Pages:

  • Added a new PageDescriptionEditor component using Tiptap, providing a rich text editor for page descriptions with formatting options and keyboard shortcut support.

API Type Improvements:

  • Added CreatePageRequest and UpdatePageRequest types to the API type definitions for improved type safety and clarity in page-related API calls.

These changes collectively enable draft work item workflows, improve the UI/UX for creating and editing content, and enhance type safety throughout the codebase.

@nazarli-shabnam nazarli-shabnam added this to the Deadline milestone Mar 25, 2026
@nazarli-shabnam nazarli-shabnam self-assigned this Mar 25, 2026
@nazarli-shabnam nazarli-shabnam added enhancement New feature or request API labels Mar 25, 2026
@nazarli-shabnam nazarli-shabnam linked an issue Mar 25, 2026 that may be closed by this pull request
Copilot AI review requested due to automatic review settings March 25, 2026 23:41
Copy link
Copy Markdown

@Rafetikus Rafetikus left a comment

Choose a reason for hiding this comment

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

Great!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds workspace-level draft work items so users can create, publish, delete, and paginate drafts across all projects in a workspace, and introduces a new TipTap-based editor used by newly added page create/detail screens.

Changes:

  • Backend: add GET /api/workspaces/:slug/draft-issues/ and plumb workspace draft listing through handler/service/store.
  • Backend + UI: add is_draft support to issue create/update flows (API + multiple create entrypoints).
  • UI: implement a richer Drafts page and add a new PageDescriptionEditor plus new page create/detail routes/screens.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
ui/src/services/issueService.ts Adds listWorkspaceDrafts and updates issue update payload typing for is_draft.
ui/src/pages/ViewDetailPage.tsx Includes is_draft in create payload when creating from a view.
ui/src/pages/ModuleDetailPage.tsx Includes is_draft in create payload when creating from a module.
ui/src/pages/IssueListPage.tsx Includes is_draft in create payload when creating from the list page.
ui/src/pages/IssueDetailPage.tsx Includes is_draft when creating sub-issues.
ui/src/pages/DraftsPage.tsx Implements workspace drafts listing UI with pagination + publish/delete actions.
ui/src/components/CreateWorkItemModal.tsx Adds draftOnly mode and forwards isDraft to onSave.
ui/src/api/types.ts Adds is_draft to CreateIssueRequest.
ui/src/components/PageDescriptionEditor.tsx New TipTap editor component for page descriptions.
ui/src/pages/PageDetailPage.tsx New page detail UI using PageDescriptionEditor and pageService methods.
ui/src/pages/NewPagePage.tsx New page creation UI using PageDescriptionEditor and pageService methods.
api/internal/router/router.go Registers GET /workspaces/:slug/draft-issues/.
api/internal/handler/issue.go Adds ListWorkspaceDrafts endpoint and wires is_draft into create/update handlers.
api/internal/service/issue.go Adds ListDraftsForWorkspace and wires isDraft through create/update service methods.
api/internal/store/issue.go Adds DB query to list drafts by workspace id with pagination.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nazarli-shabnam nazarli-shabnam marked this pull request as draft March 25, 2026 23:48
@martian56 martian56 changed the title 56 drafts workspace implementation feat: drafts workspace implementation Mar 26, 2026
@nazarli-shabnam nazarli-shabnam requested a review from Copilot March 26, 2026 08:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nazarli-shabnam nazarli-shabnam marked this pull request as ready for review March 26, 2026 13:19
@martian56 martian56 self-requested a review March 26, 2026 16:48
@nazarli-shabnam nazarli-shabnam merged commit f340d2e into main Mar 26, 2026
8 checks passed
Copy link
Copy Markdown
Member

@martian56 martian56 left a comment

Choose a reason for hiding this comment

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

Well Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API enhancement New feature or request UI UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drafts Workspace Implementation

4 participants