Skip to content

[Feature] Note view type: documents that belong to a view #772

Closed

Description

@pikann

Summary

Add a new view type, Note, alongside Board, Table, Gantt and Plugin. A note view works like the Documents feature (rich-text BlockNote documents with a tree, titles, snapshots and activity). The difference is where its documents live. Notes belong to the view, not to a project-level folder. A note is effectively a document scoped to a view.

Problem

  • Views today (sprint_views.view_type: table | board | gantt | plugin) can only show tasks. A sprint, backlog or timeline has nowhere for free-form writing, such as sprint goals, planning notes, meeting minutes or a release checklist.
  • Documents (documents, doc_folders) are project-wide. Notes for one sprint or one view end up mixed into the global docs tree, and nothing ties them to the view they describe.
  • Sprint-related writing gets lost in the shared docs tree. It isn't visible where the team works, and it isn't cleaned up when the view or sprint is deleted.

Proposed solution

Data model

  • Extend the sprint_views.view_type CHECK to allow 'note'. The migration follows the 000006_add_plugin_view_type.sql precedent.
  • Add a nullable view_id uuid (FK → sprint_views.id) to documents. A document belongs either to a folder or root (view_id IS NULL), or to a view (view_id set, folder_id NULL). Enforce this with a CHECK constraint.
  • Documents with a view_id do not appear in the project Docs sidebar tree. They are removed when the view is deleted (soft-delete cascade).

API

  • Reuse the existing document endpoints and services (create, update, move, snapshots, comments, activities). Add a view_id filter on list and create, and require it for note-view documents.
  • Authorization stays in the router gates, as for other docs. Access follows the view's project and scope, and resource-scoped roles that cover the view apply.

Web

  • Add "Note" to ViewLayout and to viewTypeToLayout / layoutToViewType in apps/web/src/lib/interaction-api.ts.
  • Add a Note layout to the interaction views (interaction-layout.tsx), available in the Sprint, Backlog and Timeline contexts. It has a list of the view's notes and the existing BlockNote doc editor, with create, rename, reorder and delete.
  • Reuse the docs editor component and the realtime sync from the docs route (projects/$projectId/docs/$docId.tsx) rather than building a second editor.
  • Add the "Note" option to the view-creation UI. Add en strings and real translations for all 8 other locales (the locale parity test enforces this).

MCP

  • Expose note-view documents through the existing doc tools, with a view_id parameter. Update apps/mcp/ALL_TOOLS.md and the changelog.

Tests / docs

  • Go integration tests: create, list and delete notes in a view, and cascade on view deletion.
  • An e2e spec in apps/e2e for creating a note view and editing a note.
  • Update docs/architecture/database-schema.md.

Out of scope for the first version

  • Moving a note between a view and the project docs tree.
  • Nested folders inside a note view.

Alternatives considered

No response

Area

Product behavior

Additional context

  • Relevant code:
    • docs/architecture/database-schema.md (sprint_views, documents, doc_folders)
    • apps/web/src/lib/interaction-api.ts (ViewLayout)
    • apps/web/src/components/projects/interactions/interaction-layout.tsx
    • apps/web/src/lib/doc-api.ts
    • apps/web/src/routes/_authenticated/projects/$projectId/docs/$docId.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions