feat(issues): load all open issues without limit, paginate closed (#459)
- Add ListOpenIssues SQL query (excludes done/cancelled, no LIMIT) - Add CountIssues SQL query for true total count - Backend: support open_only=true param, fix total to return real count - Frontend: two-phase fetch in issue store (all open + first 50 closed) - Add fetchMoreClosed action for paginated closed issue loading - Replace all hardcoded limit:200 with store.fetch() calls Resolves MUL-369 Co-authored-by: Devv <devv@Devvs-Mac-mini.local> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9d1570b301
commit
abcc7bf3cd
8 changed files with 194 additions and 24 deletions
|
|
@ -51,3 +51,18 @@ RETURNING *;
|
|||
|
||||
-- name: DeleteIssue :exec
|
||||
DELETE FROM issue WHERE id = $1;
|
||||
|
||||
-- name: ListOpenIssues :many
|
||||
SELECT * FROM issue
|
||||
WHERE workspace_id = $1
|
||||
AND status NOT IN ('done', 'cancelled')
|
||||
AND (sqlc.narg('priority')::text IS NULL OR priority = sqlc.narg('priority'))
|
||||
AND (sqlc.narg('assignee_id')::uuid IS NULL OR assignee_id = sqlc.narg('assignee_id'))
|
||||
ORDER BY position ASC, created_at DESC;
|
||||
|
||||
-- name: CountIssues :one
|
||||
SELECT count(*) FROM issue
|
||||
WHERE workspace_id = $1
|
||||
AND (sqlc.narg('status')::text IS NULL OR status = sqlc.narg('status'))
|
||||
AND (sqlc.narg('priority')::text IS NULL OR priority = sqlc.narg('priority'))
|
||||
AND (sqlc.narg('assignee_id')::uuid IS NULL OR assignee_id = sqlc.narg('assignee_id'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue