Repository navigation
feat(api,mcp,frontend): metadata-only list payloads, opt-in REST flags; 10k description cap - #188
Merged
Merged
Conversation
Task list payloads carry unbounded descriptions, so the list path needs a variant that never reads the description column. Mirrors NoteRepository::list_metadata_only: same filters, ordering, and counts, with description omitted from both SQL branches and rows mapped inline.
Task list pages carried full developer specs, up to 15k chars per 10-item page. task_list now mirrors note_list: query keeps full search results, include_content=true returns full list rows, and the default lists metadata only through TaskRepository::list_metadata_only.
GET /api/v1/task-lists/{list_id}/tasks returned all 45 live tasks with full specs, about 35k chars. The handler now defaults to metadata-only rows through TaskRepository::list_metadata_only; include_description=true restores full rows and q search keeps descriptions. TaskResponse and single-entity endpoints are unchanged.
The REST task list now omits descriptions by default, but Kanban cards render a 100-char markdown preview from list data. list_for_task_list appends include_description=true so all five call sites keep their previews without a signature change.
Skill listings embed the full SKILL.md body, so the list path needs a variant that never reads the content column. Mirrors the notes and tasks metadata-only lists: identical filters, DISTINCT/JOIN handling, ordering, and counts, with a dedicated row mapper that sets content to an empty string.
Skill listings embedded full SKILL.md bodies, several at 10k+ chars. skills_list now mirrors note_list and task_list: query keeps full search results, include_content=true returns full rows, and the default lists metadata only through SkillRepository::list_metadata_only.
GET /api/v1/skills returned every SKILL.md body. List rows now blank the content unless include_content=true, after the enabled flag is computed from the stored content, so enabled stays correct. Search keeps full content; single-entity GET is unchanged.
The include_content opt-in is removed from task_list and skill_list. Plain lists use the metadata-only repository methods, searches still run FTS for selection, and both paths project descriptions/content to their metadata placeholders at the response layer. Get-by-id tools keep full content.
The include_description and include_content query params are removed from the task and skill list endpoints. Lists use the metadata-only repository methods, FTS still selects rows for search, and both paths blank the blob at the response layer. is_skill_enabled now checks the cache directory by record name, so enabled survives blanking without parsing content.
note_list drops include_content. Plain lists use the metadata-only repository method, searches still run FTS for selection, and both paths blank content at the response layer. note_get and note_read keep full content.
GET /api/v1/notes now lists metadata-only rows and projects search results to the same shape, with no opt-in parameter. The empty-q early return and the response envelope are unchanged; single-entity note endpoints keep full content.
RULING v2: REST lists default to metadata-only but accept include_description/include_content for full rows, and search returns full content again. The name-based is_skill_enabled refactor stays. MCP keeps its flag-free metadata-only contract.
MCP task_list_list now returns notes null on plain and search results with no flag, per the metadata-only MCP contract. REST GET /api/v1/task-lists defaults to notes null but accepts include_notes=true for full notes on both the list and q-search routes; single-entity responses keep notes.
GET /api/v1/notes regains the opt-in flag with the v2 contract: default lists are metadata-only, include_content=true returns full rows, and a non-empty q searches with full content. The q-empty early return and single-entity handlers are unchanged.
Task descriptions were unbounded at the application layer: validate_task checked only title and priority, so create and update accepted arbitrarily large payloads while notes already reject content above a hard maximum. Tasks now follow the same policy with a single 10,000-character cap. The check lives in validate_task, which already runs on create and update, so no new call sites are added. Over-limit descriptions now fail with DbError::Validation (MCP: invalid_params validation_error) instead of a raw SQLite CHECK error. Rows seeded before the cap keep working for reads, listing, transitions, and restores; only new or edited over-limit descriptions are rejected.
The REST notes list now defaults to metadata-only, so the notes and project-notes pages rendered cards without bodies. Both QueryBuilder chains append include_content=true; note detail and skills fetches are unchanged.
The project-detail notes tab, the note-stack sidebar (initial and load-more) and the print subnote loop all render content from list data, so each fetch now appends include_content=true. The has-subnotes probe stays metadata-only and by-id fetches are untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
task_list,skills_list,note_list,task_list_list) are metadata-only: no opt-in params, no content, even in search results. Agent-facing context can no longer be polluted by list content.include_description,include_content,include_notes); RESTq-search keeps full content.5fd65a9d) — 7 explicit flag pushes (api/mod.rs:315include_descriptionfor kanban previews; notes pages/panes/print/stacksinclude_content); ungated-field consumers stay flag-free; by-id fetches remain the deep-content path.Why (agent-usability rationale)
task_list_listcall in this project's own session pulled 20k+ chars of unread notes.Breaking changes
include_contentparam REMOVED fromtask_list/skills_list/note_list(metadata-only responses; content via get-by-id tools)./notesand/skillslists no longer return content unconditionally (opt-in);/task-listsomitsnotesby default (include_notes).DB methods
TaskRepository::list_metadata_only(task.rs:361),SkillRepository::list_metadata_only(skill.rs:351).is_skill_enabledis now record-name-based (reviewer-verified: the frontmatter-parse variant could not survive metadata-only).Verification
Notes
git rebase --exec 'git commit --amend --no-edit -S' 1a76afcif desired — a squash merge makes signatures moot).5fd65a9d.78ffc6da+ 6 subtasks + hotfixes7159f38d/5f741a35+ cancelled534b8ee8.