Release: v2.1.0#219
Merged
Merged
Conversation
home/sheets in gitsheets-axi counted records via queryAll().length, which loads and parses every record just to count them — slow on large sheets. Add Sheet.count(filter?): with no filter (outside a transaction) it counts candidate tree paths via recordQueryCandidates without parsing any record; a value/function filter or a tx-bound sheet falls back to a body-less scan that honors the filter. count() agrees with queryAll().length in all cases (new sheet-count.test.ts). Documented in specs/api/sheet.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hr8McAaAQC9SPXrzvXejRd
Two bugs in the `home`/`sheets` overview:
- The records column used `computed('records', item => `${item.records}`)`,
whose template literal stringified the count, so TOON quoted it ("2").
Use `field('records')` so it renders as a bare number (2).
- countRecords loaded every record via queryAll to count them; switch to
the new cheap Sheet.count(). No more full-sheet materialization on `home`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hr8McAaAQC9SPXrzvXejRd
Author
Changelog- feat(sheet): add Sheet.count() — cheap record count without parsing @themightychris
- fix(axi): count via Sheet.count() + render record counts as numbers @themightychris
- docs(skill): update gitsheets skill for the v2 Rust core @themightychris |
- sheet-config.md: markdown normalization is now the native dprint formatter with a single `normalize = false` toggle; drop the removed `[gitsheet.format.markdownlint]` rule config. JSON-Schema validation is the Rust core's `jsonschema` (Draft-07, strict unknown-keyword rejection), not ajv; drop the "ajv extension" framing on `$data`. - api.md: repo discovery is the Rust core (gix), attachment/diff blobs are gitsheets `BlobHandle` (not hologit `BlobObject`); add `Sheet.count()`. - SKILL.md: note the Rust-core engine + prebuilt @gitsheets/core-napi addon, the Python binding, and the one-time canonical re-baseline. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hr8McAaAQC9SPXrzvXejRd
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.
v2.1.0 adds
Sheet.count(), a cheap record count that walks candidate paths without parsing any record, and fixes thegitsheets-axihome/sheetsoverview: record counts now render as bare numbers instead of quoted strings, and are counted via the cheap path rather than by loading every record in every sheet.Improvements
Technical