Skip to content

feat: add Views backend + frontend API layer (MUL-2704)#3351

Closed
NevilleQingNY wants to merge 5 commits into
mainfrom
agent/matt/fe977677
Closed

feat: add Views backend + frontend API layer (MUL-2704)#3351
NevilleQingNY wants to merge 5 commits into
mainfrom
agent/matt/fe977677

Conversation

@NevilleQingNY
Copy link
Copy Markdown
Collaborator

Summary

  • Backend: saved_view table (migration 110) with CRUD handlers, lazy default view creation (Issues/My Issues/Project), 12 new filter params on /api/issues ({me} token, involves 6-branch OR, statuses, priorities, assignee_type, assignee_filters, creator_filters, project_ids, label_ids, include_no_assignee, include_no_project), WebSocket events, and performance indexes on agent(owner_id) and issue(creator_id)
  • Frontend: TypeScript types, Zod schemas, API client methods (5 Views CRUD + listIssues filter forwarding), TanStack Query hooks with optimistic updates (useCreateView, useUpdateView, useDeleteView, useReorderViews)
  • Zero breaking changes — all old params and /api/issues/grouped preserved for desktop client compatibility

Test plan

  • go build ./... passes
  • go vet ./... passes
  • pnpm typecheck passes (6/6 tasks)
  • Migration 110 up/down works on local DB
  • GET /api/views?page=issues returns lazy-created default views
  • POST /api/views creates a new view
  • PUT /api/views/:id updates name/filters/shared
  • DELETE /api/views/:id blocks deletion of is_default=true views
  • GET /api/issues?assignee={me} resolves to current user
  • GET /api/issues?involves={me} returns all user-related issues (6-branch OR)
  • GET /api/issues?statuses=todo,in_progress works independently of status param
  • Old desktop client params (assignee_id, creator_id, involves_user_id) still work

🤖 Generated with Claude Code

Implement saved_view table, CRUD handlers, lazy default creation,
12 new filter params on /api/issues ({me} token, involves 6-branch OR,
statuses, priorities, assignee_type, label_ids, etc.), plus frontend
types, schemas, API client methods, and TanStack Query hooks with
optimistic updates.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

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

Project Deployment Actions Updated (UTC)
multica-docs Ready Ready Preview, Comment May 27, 2026 10:41am

Request Review

…d integration (MUL-2704)

Backend fixes:
- A1: Validate project_id belongs to current workspace in ListViews/CreateView
- A2: Export @multica/core/views subpath from package.json
- A3: Fix filter key casing — assigneeType → assignee_type in default views
- A4: Add canManageView auth check to ReorderViews handler
- A5: Move hot-table indexes to migration 111 with CREATE INDEX CONCURRENTLY

Frontend integration (steps 3-8):
- Replace hardcoded scope tabs with dynamic view tabs loaded from server
- Issues page and My Issues page fetch views via GET /api/views
- Active view's filters are passed as server-side params to GET /api/issues
- issueListOptions now accepts an optional filter param
- viewFiltersToApiParams utility maps view JSON filters to API params
- WS view events invalidate the views query cache
- Thread viewFilter through BoardView/ListView/useLoadMoreByStatus for cache key consistency
- Update tests to mock views API and verify new behavior

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
…ype cleanup

1. Fix non-default views resurrecting after deletion: ListViews now
   seeds all presets only on first access (zero rows); subsequent calls
   only ensure is_default=true views, so deleted presets stay deleted.
2. Add display JSONB column (migration 112) for view display settings
   (viewMode, grouping, sort, cardProperties) — wired through backend
   CRUD, Zod schema, and frontend types.
3. Remove unused position field from UpdateViewRequest.
4. Add comment explaining why My Issues resolves {me} client-side.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
NevilleQingNY and others added 2 commits May 27, 2026 18:23
Replace hardcoded scope tabs with dynamic view tabs loaded from the
Views API. Supports creating custom views, renaming, deleting, and
saving filter state. Default views (All/Members/Agents) map to scopes
via known filter patterns; custom views serialize full filter state
into the filters JSONB under a __custom key.

New files:
- packages/core/issues/stores/active-view-store.ts (persisted active view tracking)
- packages/core/views/helpers.ts (serialize/deserialize/dirty detection)
- packages/views/issues/components/view-tabs.tsx (reusable tab component)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
Brings in the complete ViewTabs component, active-view-store,
helpers (serialize/deserialize/dirty-check), and i18n locales
that were developed on a separate worktree branch but never
merged into the PR branch.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
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