Skip to content

feat: add collection mentions and upgrade Vite+ - #140

Merged
mrboxs merged 2 commits into
mainfrom
t3/upgrade-vite-plus-migrate
Nov 4, 2026
Merged

mrboxs merged 2 commits into
mainfrom
t3/upgrade-vite-plus-migrate

Conversation

@mrboxs

@mrboxs mrboxs commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Markdown editors can now mention public collections alongside projects through the @ picker and slash menu. Collection links round-trip into editable badges and render publicly with hover previews showing the description, collection kind, and project count.

The picker groups projects and collections, preserves results when one search fails, and excludes unavailable collections using the existing public visibility policy. About and collection pages now prepare mention metadata for SSR, and collection edits/deletions invalidate cached previews.

This branch also upgrades Vite+ and its Vite alias from 1.4.0 to 1.5.0 via vp upgrade and vp migrate, with the Bun lockfile refreshed.

Validation:

  • 172 targeted web tests across 11 files passed, including Markdown round-trips, SSR/hydration, page integration, and editor persistence.
  • 14 collection API tests passed against the isolated PostgreSQL test database.
  • 4 Chromium tests passed, covering keyboard selection, partial search failure, and mobile hover/focus navigation in light and dark themes.
  • vp check passed on all 28 changed TypeScript/TSX files with no warnings or errors.
  • React Doctor reported no findings in changed web code.
  • vp run --filter web build passed, including SSR. Chunk-size and dynamic-import warnings remain.

The full test suite was not run.

Summary by CodeRabbit

  • New Features
    • Mention collections alongside projects in the editor, with search results grouped by type.
    • Collection mentions are preserved in Markdown and display as linked badges in published content.
    • Hover or focus collection badges to preview collection details, including its description, logo, and member count.
    • Collection links in About and collection pages can show previews and navigate to collection details.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes add collection mentions to BlockNote search, Markdown restoration, and public-content rendering. They add API queries for public collection mentions and prepare collection metadata for collection and About page content. The Vite catalog version also changes.

Changes

Collection Mentions

Layer / File(s) Summary
Collection mention API
packages/shared/src/schemas/collection.ts, packages/api/src/contracts/collection.ts, packages/api/src/queries/collection.ts, packages/api/src/routers/collection.ts, packages/api/tests/collection.test.ts
Shared schemas and a public API endpoint support collection mention search and slug lookup. Queries filter for public collections, map artwork, and limit search results to eight.
BlockNote collection mentions
apps/web/src/components/block-note/collection-mention.tsx, apps/web/src/components/block-note/schema.ts, apps/web/src/components/block-note/project-mention-menu.tsx, apps/web/tests/block-note-project-mentions.test.tsx, apps/web/tests/browser/collection-mentions.browser.tsx
The editor searches projects and collections, inserts collection mentions, and restores matching links from Markdown. Tests cover round-tripping, partial search failures, previews, and navigation.
Prepare collection metadata for public content
apps/web/src/features/public-content/model.ts, apps/web/src/features/public-content/prepare.server.ts, apps/web/src/features/public-content/queries.ts, apps/web/src/features/public-content/server-function.ts, apps/web/tests/public-content-prepare.test.ts, apps/web/tests/public-content-query.test.ts, apps/web/tests/public-content-server-function.test.ts
Public-content preparation extracts collection slugs and fetches mention data. Query and server-function paths support collection and About page content.
Render collection mentions on public pages
apps/web/src/routes/_app/about.tsx, apps/web/src/routes/_app/collections/$slug.tsx, apps/web/src/features/about/article.tsx, apps/web/src/features/collections/components.tsx, apps/web/src/components/public-content/*, apps/web/src/features/admin-collections/editor.tsx, apps/web/src/routes/_main/admin.collections/index.tsx, apps/web/tests/public-content.test.tsx, apps/web/tests/public-category-routes.test.tsx
About and collection routes pass prepared content to the renderer. Internal collection links can render as badges with hover previews. Successful collection saves and deletions invalidate public-content queries.

Vite Catalog Version

Layer / File(s) Summary
Update Vite catalog versions
package.json
The Vite and Vite Plus catalog versions change from 1.4.0 to 1.5.0.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant MentionSuggestions
  participant CollectionRouter as collectionRouter.mentions
  participant SearchQuery as searchPublicCollectionMentions
  participant Database
  User->>MentionSuggestions: Enter a mention query
  MentionSuggestions->>CollectionRouter: Request collection results
  CollectionRouter->>SearchQuery: Pass query text
  SearchQuery->>Database: Search public collections
  Database-->>SearchQuery: Return matching collections
  SearchQuery-->>CollectionRouter: Return collection mentions
  CollectionRouter-->>MentionSuggestions: Return collection results
  User->>MentionSuggestions: Select a collection
  MentionSuggestions-->>User: Insert collection mention
Loading

Possibly related PRs

  • isntboxs/altstack#129: Adds the public collection routes, schemas, queries, and admin workflow that these collection mention changes extend.
  • isntboxs/altstack#130: Changes the collection editor save flow and collection detail route, which this change also updates.
  • isntboxs/altstack#133: Extends the public-content preparation and rendering contracts that this change further extends for collection and About content.
Merge Risk: Minimal · up to 5bdaa

No merge-blocking issue was identified; the change is ready for normal merge checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 17.65% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat: add collection mentions and upgrade Vite+" names both main parts of the changeset. The main feature is public collection mentions in Markdown editors, with picker grouping, SSR prepar…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat: add collection mentions and upgrade Vite+" names both main parts of the changeset. The main feature is public collection mentions in Markdown editors, with picker grouping, SSR preparation, hover previews, and API endpoints. The Vite+ upgrade from 1.4.0 to 1.5.0 is also present in package.json and the PR objectives. The title is specific and matches the changes, so it passes.

Full details: Docstring Coverage

Explanation

Docstring coverage is 17.65% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 17 functions across 28 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between f42af92 and 5bdaaf6.

Files ignored due to path filters: 1
  • bun.lock is excluded by !**/*.lock
Files selected for processing: 29
  • apps/web/src/components/block-note/collection-mention.tsx
  • apps/web/src/components/block-note/project-mention-menu.tsx
  • apps/web/src/components/block-note/schema.ts
  • apps/web/src/components/collection-hover-card.tsx
  • apps/web/src/components/public-content/content-link.tsx
  • apps/web/src/components/public-content/index.tsx
  • apps/web/src/features/about/article.tsx
  • apps/web/src/features/admin-collections/editor.tsx
  • apps/web/src/features/collections/components.tsx
  • apps/web/src/features/public-content/model.ts
  • apps/web/src/features/public-content/prepare.server.ts
  • apps/web/src/features/public-content/queries.ts
  • apps/web/src/features/public-content/server-function.ts
  • apps/web/src/routes/_app/about.tsx
  • apps/web/src/routes/_app/collections/$slug.tsx
  • apps/web/src/routes/_main/admin.collections/index.tsx
  • apps/web/tests/block-note-project-mentions.test.tsx
  • apps/web/tests/browser/collection-mentions.browser.tsx
  • apps/web/tests/public-category-routes.test.tsx
  • apps/web/tests/public-content-prepare.test.ts
  • apps/web/tests/public-content-query.test.ts
  • apps/web/tests/public-content-server-function.test.ts
  • apps/web/tests/public-content.test.tsx
  • package.json
  • packages/api/src/contracts/collection.ts
  • packages/api/src/queries/collection.ts
  • packages/api/src/routers/collection.ts
  • packages/api/tests/collection.test.ts
  • packages/shared/src/schemas/collection.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 5bdaaf6.

@mrboxs
mrboxs merged commit dc50040 into main Nov 4, 2026
3 checks passed
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