Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

query_collection: implement filter/sort/groupBy/summaries parity with the UI's ViewConfig

Aperta
#175 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
64/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Inizia con le funzioni pure in src/lib/data/views.ts e confronta la semantica del loro ViewConfig con lo schema dello strumento query_collection. Leggi docs/specifications/collection-views.md §8/§9 e la riga query_collection in docs/specifications/mcp-tools.md, quindi aggiungi una copertura Tier A per proiezioni MCP e UI equivalenti. Il lavoro è completo quando filter, sort, groupBy e summaries producono le stesse righe proiettate senza usare il SQLite record_index.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement help wanted

query_collection's filter parameter is accepted but unused (a no-op), and there's no sort/groupBy/summaries parameter at all — an MCP agent always gets a Collection's raw, unfiltered rows regardless of what a human's Table/Board/Calendar view is configured to show. src/lib/data/views.ts's pure functions (applyFilters/applySort/groupBySelectProperty/computeFieldSummary) already implement the exact semantics needed; the gap is wiring them into the MCP tool surface, not designing new ones.

Originally scoped as part of #32, deliberately deferred there — see collection-views.md §8/§9 for the existing "deliberate two-surface design for now, not an oversight" framing, and mcp-tools.md's query_collection row for the current documented gap.

  • Add sort/groupBy/summaries parameters to query_collection's tool schema, matching ViewConfig's shape
  • Make the existing filter parameter actually apply (applyFilters) instead of being a no-op
  • Reuse views.ts's existing pure functions rather than reimplementing filter/sort/group logic for the MCP path
  • Update mcp-tools.md and collection-views.md to describe the now-implemented parity instead of the gap
  • Tier A test coverage proving an MCP query_collection call with filter/sort/groupBy set returns the same projection the UI's projectRecords/groupBySelectProperty would for an equivalent ViewConfig

Not in scope: the SQLite record_index read model persistence.md §2 describes (tracked separately, not built — see #70); query_collection continues reading the Y.Doc directly, the same source views.ts already projects over.

Done when: an agent calling query_collection with filter/sort/groupBy parameters gets back the same projected rows a human's equivalently-configured Table/Board/Calendar view would show.

Found while working the code-quality-tooling branch (#170/#172/#173).


Added to 0.5.0 — Stability, Reliability, and QA (2026-09-12): closes a real agent-parity gap — an MCP agent currently gets raw, unfiltered Collection rows regardless of what a human's equivalently-configured Table/Board/Calendar view shows, directly undercutting PRD Goal #1 (agent parity) for Collections. Reuses existing views.ts functions, no new logic to design.

Lingua principale
TypeScript
Stelle
1
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di brylie/compendium

Tutte le issue di brylie/compendium

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.