Skip to content

Require a namespacePrefix for methods that cover every namespace - #291

Closed
reeceyang wants to merge 1 commit into
reece/namespace-prefixfrom
reece/safe-clear-all
Closed

reeceyang wants to merge 1 commit into
reece/namespace-prefixfrom
reece/safe-clear-all

Conversation

@reeceyang

@reeceyang reeceyang commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Requires a namespacePrefix for clearAll, makeAllRootsLazy, iterNamespaces, and paginateNamespaces, because without one they reach every namespace in the component, including other aggregates' data (an unprefixed clearAll wiped prefixed aggregates in testing). The new clearComponent, makeComponentRootsLazy, iterComponentNamespaces, and paginateComponentNamespaces take the component and do that explicitly, and the README now recommends unmounting a component and deleting it from the dashboard to discard large amounts of data. Also fixes clearAll never finishing with more than 100 namespaces: clear deleted and re-inserted each tree, so the re-inserted rows kept showing up after the _id cursor, and it now swaps the root in place instead.

Stack

🤖 Generated with Claude Code

@pkg-pr-new

pkg-pr-new Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@convex-dev/aggregate@291

commit: 0bad93c

@reeceyang
reeceyang force-pushed the reece/safe-clear-all branch from 1a18de6 to 0bad93c Compare November 16, 2026 20:51
@reeceyang reeceyang changed the title Make clearAll safe when aggregates share a component Require a namespacePrefix for methods that cover every namespace Nov 16, 2026
@reeceyang

Copy link
Copy Markdown
Contributor Author

From Claude: closing in favor of the named-aggregates approach in #292 and #278.

@reeceyang reeceyang closed this Nov 17, 2026
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.

1 participant