Skip to content

Add a single snapshot test to diffs#182

Merged
SlexAxton merged 5 commits intomainfrom
alex/diffs/tests
Dec 2, 2025
Merged

Add a single snapshot test to diffs#182
SlexAxton merged 5 commits intomainfrom
alex/diffs/tests

Conversation

@SlexAxton
Copy link
Copy Markdown
Contributor

Gettin' it goin'

bun run diffs:test

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 2, 2025

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

Project Deployment Preview Updated (UTC)
pierrejs-diff-demo Ready Ready Preview Dec 2, 2025 1:03am
pierrejs-docs Ready Ready Preview Dec 2, 2025 1:03am
pierrejs-solid-diff-demo Ready Ready Preview Dec 2, 2025 1:03am

@@ -0,0 +1,1558 @@
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're not used to snapshot testing, this file is automatically generated with --update-snapshots - it's supposed to be checked in. Then when you run tests in the future it checks them against this snapshot. And if it's different than what comes out it errors. If you intend for the change to occur, then you run --update-snapshots again and check in the change. Now all changes to the AST output come with a visible representation of the diff in output.

image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh damn that's sick

Comment thread AGENTS.md

```bash
# From the package directory
bun test --update-snapshots
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we let the AI know about this? Could that result in them seeing a failing test and then going oh, well, i'll just update the snapshots to fix the problem?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are like an industry standard, so AI should know when to do it and when to not.

@SlexAxton SlexAxton merged commit 5ba5546 into main Dec 2, 2025
8 checks passed
@SlexAxton SlexAxton deleted the alex/diffs/tests branch December 2, 2025 01:44
SlexAxton added a commit that referenced this pull request Apr 21, 2026
Improves the packages/trees file-tree profiler startup path for large pre-expanded/open trees. The change stack removes redundant prepared-input validation, represents profiler workloads with initialExpansion: 'open', slims PathStore node/storage shapes, reduces cold startup writes, tunes visible-child chunk summaries, and removes redundant FileTreeView mount/render work.

Experiments: kept runs #1, #16, #18, #24, #25, #26, #28, #36, #41, #42, #43, #44, #51, #65, #67, #68, #71, #74, #80, #82, #137, #139, #140, #142, #143, #147, #149, #153, #155, #163, #165, #171, #180, #182, #186, #196
Metric: visibleRowsReadyMs 334.8ms -> 253.8ms best (-24.2%); final kept sample 267.8ms (-20.0%).
SlexAxton added a commit that referenced this pull request Apr 22, 2026
Improves the packages/trees file-tree profiler startup path for large pre-expanded/open trees. The change stack removes redundant prepared-input validation, represents profiler workloads with initialExpansion: 'open', slims PathStore node/storage shapes, reduces cold startup writes, tunes visible-child chunk summaries, and removes redundant FileTreeView mount/render work.

Experiments: kept runs #1, #16, #18, #24, #25, #26, #28, #36, #41, #42, #43, #44, #51, #65, #67, #68, #71, #74, #80, #82, #137, #139, #140, #142, #143, #147, #149, #153, #155, #163, #165, #171, #180, #182, #186, #196
Metric: visibleRowsReadyMs 334.8ms -> 253.8ms best (-24.2%); final kept sample 267.8ms (-20.0%).
SlexAxton added a commit that referenced this pull request Apr 22, 2026
)

Optimize file-tree startup for large open trees

Improves the packages/trees file-tree profiler startup path for large pre-expanded/open trees. The change stack removes redundant prepared-input validation, represents profiler workloads with initialExpansion: 'open', slims PathStore node/storage shapes, reduces cold startup writes, tunes visible-child chunk summaries, and removes redundant FileTreeView mount/render work.

Experiments: kept runs #1, #16, #18, #24, #25, #26, #28, #36, #41, #42, #43, #44, #51, #65, #67, #68, #71, #74, #80, #82, #137, #139, #140, #142, #143, #147, #149, #153, #155, #163, #165, #171, #180, #182, #186, #196
Metric: visibleRowsReadyMs 334.8ms -> 253.8ms best (-24.2%); final kept sample 267.8ms (-20.0%).
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.

2 participants