Skip to content

fix: Examples tailwind paths - #387

Merged
ilyabo merged 4 commits into
mainfrom
fix--Examples-tailwind-paths
Feb 26, 2026
Merged

ilyabo merged 4 commits into
mainfrom
fix--Examples-tailwind-paths

Conversation

@ilyabo

@ilyabo ilyabo commented Feb 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

Release Notes

  • Refactor

    • Simplified module source path patterns across CSS files for improved build consistency.
    • Restructured Next.js examples with updated directory layout and component organization.
    • Renamed components for clearer semantics in Next.js examples.
  • Chores

    • Updated Next.js dependency to version 16.
    • Updated TypeScript configuration for improved JSX runtime compatibility.
    • Reorganized example project structure and paths.

Signed-off-by: Ilya Boyandin <[email protected]>
@coderabbitai

coderabbitai Bot commented Feb 25, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This pull request simplifies CSS @source directives across the codebase by replacing complex nested glob patterns with a single simplified path, restructures Next.js examples to move source files from app/ to src/app/, renames a component from AppShell to Room, and updates configuration files and dependencies accordingly.

Changes

Cohort / File(s) Summary
CSS @source Simplification
apps/sqlrooms-cli-ui/src/style.css, docs/upgrade-guide.md, examples/*/src/index.css, examples/ai-nextjs/src/globals.css, examples/nextjs/src/globals.css
Replaces complex nested node_modules glob patterns ({./,../../../}node_modules/@sqlrooms/*/dist/**/*.js and .pnpm/ variants) with a single simplified relative path (../node_modules/@sqlrooms/*/dist/), narrowing source pattern resolution.
Next.js Examples File Structure
examples/ai-nextjs/app/page.tsx, examples/nextjs/app/page.tsx, examples/ai-nextjs/src/app/page.tsx, examples/nextjs/src/app/page.tsx
Relocates page.tsx from root app/ directory to src/app/ directory; removes old page files and adds new ones with AppShellClient imports.
Next.js Component Restructuring
examples/ai-nextjs/src/components/room.tsx, examples/nextjs/src/components/room.tsx, examples/ai-nextjs/src/components/app-shell-client.tsx, examples/nextjs/src/components/app-shell-client.tsx
Renames AppShell component to Room; introduces new client-side AppShellClient component that dynamically imports Room with SSR disabled via Next.js dynamic import.
Next.js Configuration Updates
examples/ai-nextjs/next-env.d.ts, examples/ai-nextjs/tsconfig.json, examples/nextjs/tsconfig.json, examples/ai-nextjs/package.json, examples/nextjs/package.json
Updates JSX runtime from "preserve" to "react-jsx", adjusts path alias from "@/\": "./" to "@/\": "./src/", updates Next.js from 15.5.10 to ^16.1.6, converts triple-slash directive to ES module import, and adds knip configuration entries.
Layout and Import Path Updates
examples/ai-nextjs/src/app/layout.tsx, examples/nextjs/src/app/layout.tsx
Updates global stylesheet import path from ./globals.css to ../globals.css to reflect new directory structure.
Store Export Visibility
examples/nextjs/src/app/store.ts
Removes export modifier from RoomState type alias, changing it from public to internal visibility.
Root Configuration
knip.json
Updates Next.js example entry and ignore paths from app/* to src/app/* to reflect restructured file locations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Hops with glee, the sources now so clean,
Simplified paths where complexity had been,
Components renamed, structures rearranged,
Next.js upgraded, the config exchanged,
One glob to rule them all, a rabbit's delight! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: Examples tailwind paths' accurately describes the primary change: simplifying and correcting Tailwind @source directives across example CSS files and configuration files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix--Examples-tailwind-paths

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (7)
examples/minimal/src/index.css (1)

8-8: Same change as examples/get-started/src/index.css — already reviewed above.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/minimal/src/index.css` at line 8, Replace the invalid CSS at-rule
"@source '../node_modules/@sqlrooms/*/dist/';" with a proper import; update the
`@source` token to "@import" and point the import to the concrete CSS file(s) used
(match the change made in examples/get-started/src/index.css) so the stylesheet
actually loads from the package dist output instead of using the unsupported
`@source` glob.
examples/kepler/src/index.css (1)

8-8: Same change as examples/get-started/src/index.css — already reviewed above.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/kepler/src/index.css` at line 8, This is a duplicate of the fix you
made in examples/get-started/src/index.css; replace the existing line "@source
'../node_modules/@sqlrooms/*/dist/';" in examples/kepler/src/index.css with the
same corrected import statement you applied in
examples/get-started/src/index.css so both files use the identical, fixed CSS
import syntax.
examples/canvas-sync/src/index.css (1)

8-8: Same change as examples/get-started/src/index.css — already reviewed above.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/canvas-sync/src/index.css` at line 8, The CSS line uses an invalid
at-rule "@source"; replace it with a standard import such as "@import
url('../node_modules/@sqlrooms/*/dist/');" (or "@import
'../node_modules/@sqlrooms/*/dist/';" if preferred) so the stylesheet actually
imports the package files—update the statement in the file where "@source
'../node_modules/@sqlrooms/*/dist/';" appears.
examples/ai-rag/src/index.css (1)

8-8: Same change as examples/get-started/src/index.css — already reviewed above.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/ai-rag/src/index.css` at line 8, Replace the invalid `@source`
directive in index.css: locate the line with "@source
'../node_modules/@sqlrooms/*/dist/';" and change it to a proper CSS import using
"@import" and a concrete package path (e.g. "@import
'../node_modules/@sqlrooms/<package>/dist/index.css';"), removing the wildcard
and ensuring the file points to the actual package CSS you need.
examples/ai-core/src/index.css (1)

8-8: Same change as examples/get-started/src/index.css — already reviewed above.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/ai-core/src/index.css` at line 8, Replace the invalid CSS directive
"@source '../node_modules/@sqlrooms/*/dist/';" with a proper import; locate the
occurrence of the symbol "@source" in examples/ai-core/src/index.css and change
it to use the correct CSS `@import` form referencing the same path pattern so the
styles from node_modules/@sqlrooms/*/dist are actually brought into the
stylesheet.
examples/query-websocket/src/index.css (1)

8-8: Same change as examples/get-started/src/index.css — already reviewed above.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/query-websocket/src/index.css` at line 8, This line uses an invalid
`@source` directive; replace the `@source` '../node_modules/@sqlrooms/*/dist/';
entry with the same valid import syntax you applied in the other example's
index.css (i.e., change the `@source` reference to the corrected `@import` (or
equivalent valid) import used previously so the `@sqlrooms` package CSS is loaded
correctly), targeting the same package specifier that was fixed in the
get-started index.css.
examples/deckgl-mosaic/src/index.css (1)

8-8: Same change as examples/get-started/src/index.css — already reviewed above.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/deckgl-mosaic/src/index.css` at line 8, Replace the invalid CSS
directive "@source '../node_modules/@sqlrooms/*/dist/';" in
examples/deckgl-mosaic/src/index.css with a proper CSS import (same fix as
examples/get-started/src/index.css): use "@import" (or "@import url(...)" with
the exact stylesheet file) or import the specific package CSS files instead of a
bare `@source` glob; update the path to point to the concrete CSS file(s) in
`@sqlrooms/`*/dist (or mirror the glob-handling approach used in
examples/get-started/src/index.css) so the stylesheet is valid and the
dependencies load correctly.
🧹 Nitpick comments (1)
docs/upgrade-guide.md (1)

47-48: LGTM — docs now reflect the simplified @source pattern correctly.

Note: the guide example uses ./**/*.{ts,tsx} (Line 47) while the actual example CSS files still use src/**/*.{ts,tsx} (unchanged line 6 in the CSS files). These resolve differently when the CSS file itself lives in src/ — ./**/*.{ts,tsx} is actually the more correct pattern relative to the CSS file location. Consider aligning the example CSS files to use ./**/*.{ts,tsx} as well for consistency with the documentation, though this is low priority.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/upgrade-guide.md` around lines 47 - 48, Docs show the simplified `@source`
pattern as "./**/*.{ts,tsx}" but the example CSS files still use
"src/**/*.{ts,tsx}"; update the example CSS files to use "./**/*.{ts,tsx}" so
the pattern resolves consistently relative to the CSS file (search for
occurrences of "src/**/*.{ts,tsx}" in the example CSS and replace them with
"./**/*.{ts,tsx}"), leaving the documentation lines with "@source
'./**/*.{ts,tsx}';" and the "../node_modules/@sqlrooms/*/dist/" entry unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@examples/ai-nextjs/app/globals.css`:
- Around line 6-7: The `@source` paths in globals.css are incorrect and miss the
actual template locations; update the `@source` entries (the two lines starting
with "@source '../index.html';" and "@source 'src/**/*.{ts,tsx}';") to point to
the real files: reference the project root index.html correctly (e.g.,
"./index.html") and add patterns that scan app/, components/, and root files
(e.g., app/**/*.{ts,tsx,js,jsx,html}, components/**/*.{ts,tsx,js,jsx,html}, and
top-level *.{html,ts,tsx,js,jsx}) while removing the nonexistent src/**/*
pattern so Tailwind can find and generate utilities.

In `@examples/nextjs/app/globals.css`:
- Line 7: Replace the incorrect `@source` pattern '@source 'src/**/*.{ts,tsx}''
with a pattern that actually points to the local app and components directories
(for example '@source "./{app,components}/**/*.{ts,tsx}"') so Tailwind will scan
files in the app/ and components/ folders (e.g., layout.tsx, page.tsx, store.ts,
app-shell.tsx, main-view.tsx) instead of matching zero files.

---

Duplicate comments:
In `@examples/ai-core/src/index.css`:
- Line 8: Replace the invalid CSS directive "@source
'../node_modules/@sqlrooms/*/dist/';" with a proper import; locate the
occurrence of the symbol "@source" in examples/ai-core/src/index.css and change
it to use the correct CSS `@import` form referencing the same path pattern so the
styles from node_modules/@sqlrooms/*/dist are actually brought into the
stylesheet.

In `@examples/ai-rag/src/index.css`:
- Line 8: Replace the invalid `@source` directive in index.css: locate the line
with "@source '../node_modules/@sqlrooms/*/dist/';" and change it to a proper
CSS import using "@import" and a concrete package path (e.g. "@import
'../node_modules/@sqlrooms/<package>/dist/index.css';"), removing the wildcard
and ensuring the file points to the actual package CSS you need.

In `@examples/canvas-sync/src/index.css`:
- Line 8: The CSS line uses an invalid at-rule "@source"; replace it with a
standard import such as "@import url('../node_modules/@sqlrooms/*/dist/');" (or
"@import '../node_modules/@sqlrooms/*/dist/';" if preferred) so the stylesheet
actually imports the package files—update the statement in the file where
"@source '../node_modules/@sqlrooms/*/dist/';" appears.

In `@examples/deckgl-mosaic/src/index.css`:
- Line 8: Replace the invalid CSS directive "@source
'../node_modules/@sqlrooms/*/dist/';" in examples/deckgl-mosaic/src/index.css
with a proper CSS import (same fix as examples/get-started/src/index.css): use
"@import" (or "@import url(...)" with the exact stylesheet file) or import the
specific package CSS files instead of a bare `@source` glob; update the path to
point to the concrete CSS file(s) in `@sqlrooms/`*/dist (or mirror the
glob-handling approach used in examples/get-started/src/index.css) so the
stylesheet is valid and the dependencies load correctly.

In `@examples/kepler/src/index.css`:
- Line 8: This is a duplicate of the fix you made in
examples/get-started/src/index.css; replace the existing line "@source
'../node_modules/@sqlrooms/*/dist/';" in examples/kepler/src/index.css with the
same corrected import statement you applied in
examples/get-started/src/index.css so both files use the identical, fixed CSS
import syntax.

In `@examples/minimal/src/index.css`:
- Line 8: Replace the invalid CSS at-rule "@source
'../node_modules/@sqlrooms/*/dist/';" with a proper import; update the `@source`
token to "@import" and point the import to the concrete CSS file(s) used (match
the change made in examples/get-started/src/index.css) so the stylesheet
actually loads from the package dist output instead of using the unsupported
`@source` glob.

In `@examples/query-websocket/src/index.css`:
- Line 8: This line uses an invalid `@source` directive; replace the `@source`
'../node_modules/@sqlrooms/*/dist/'; entry with the same valid import syntax you
applied in the other example's index.css (i.e., change the `@source` reference to
the corrected `@import` (or equivalent valid) import used previously so the
`@sqlrooms` package CSS is loaded correctly), targeting the same package specifier
that was fixed in the get-started index.css.

---

Nitpick comments:
In `@docs/upgrade-guide.md`:
- Around line 47-48: Docs show the simplified `@source` pattern as
"./**/*.{ts,tsx}" but the example CSS files still use "src/**/*.{ts,tsx}";
update the example CSS files to use "./**/*.{ts,tsx}" so the pattern resolves
consistently relative to the CSS file (search for occurrences of
"src/**/*.{ts,tsx}" in the example CSS and replace them with "./**/*.{ts,tsx}"),
leaving the documentation lines with "@source './**/*.{ts,tsx}';" and the
"../node_modules/@sqlrooms/*/dist/" entry unchanged.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 45ef14f and 3f24657.

📒 Files selected for processing (25)
  • apps/sqlrooms-cli-ui/src/style.css
  • docs/upgrade-guide.md
  • examples/ai-agent/src/index.css
  • examples/ai-core/src/index.css
  • examples/ai-nextjs/app/globals.css
  • examples/ai-rag/src/index.css
  • examples/ai/src/index.css
  • examples/app-builder/src/index.css
  • examples/canvas-sync/src/index.css
  • examples/canvas/src/index.css
  • examples/cosmos-embedding/src/index.css
  • examples/cosmos/src/index.css
  • examples/deckgl-discuss/src/index.css
  • examples/deckgl-mosaic/src/index.css
  • examples/deckgl/src/index.css
  • examples/get-started/src/index.css
  • examples/kepler/src/index.css
  • examples/minimal/src/index.css
  • examples/mosaic/src/index.css
  • examples/multi-room/src/index.css
  • examples/nextjs/app/globals.css
  • examples/query-motherduck/src/index.css
  • examples/query-pwa/src/index.css
  • examples/query-websocket/src/index.css
  • examples/query/src/index.css

Comment thread examples/ai-nextjs/src/globals.css
Comment thread examples/nextjs/src/globals.css
Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

♻️ Duplicate comments (2)
examples/nextjs/src/globals.css (1)

6-9: ⚠️ Potential issue | 🟠 Major

Fix local @source path so Tailwind scans real app files.

Line 7 likely targets src/src/**/* from this stylesheet location, which can skip actual files under src/app/src/components and lead to missing generated utilities.

🔧 Proposed fix
 `@source` '../index.html';
-@source 'src/**/*.{ts,tsx}';
+@source './**/*.{ts,tsx}';
 `@source` '../../../packages/*/src/**/*.{ts,tsx}';
 `@source` '../node_modules/@sqlrooms/*/dist/';

Run this read-only check to verify the concern:

#!/bin/bash
set -euo pipefail

echo "Checking whether the current `@source` target exists..."
if [ -d "examples/nextjs/src/src" ]; then
  echo "examples/nextjs/src/src exists"
else
  echo "examples/nextjs/src/src does NOT exist"
fi

echo
echo "Actual TS/TSX files under examples/nextjs/src:"
fd -e ts -e tsx . examples/nextjs/src | head -n 50
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/nextjs/src/globals.css` around lines 6 - 9, The `@source` pattern
"src/**/*.{ts,tsx}" in globals.css is resolving to examples/nextjs/src/src/**/*
(skipping real app files); update that line to target files relative to this
stylesheet (for example change `@source` 'src/**/*.{ts,tsx}' to `@source`
'./**/*.{ts,tsx}') so Tailwind will scan the actual TS/TSX files under src (also
verify the other `@source` entries remain correct).
examples/ai-nextjs/src/globals.css (1)

6-9: ⚠️ Potential issue | 🟠 Major

Line 7 @source path is incorrect, and line 6 references a non-existent file.

This file is located at src/globals.css. The directive on line 7 @source 'src/**/*.{ts,tsx}' would attempt to resolve src/src/**/*.{ts,tsx}, which doesn't exist. Additionally, line 6 references ../index.html (which resolves to the project root), but no index.html file exists in the examples/ai-nextjs/ directory—Next.js projects use routes instead.

Suggested fix
-@source '../index.html';
-@source 'src/**/*.{ts,tsx}';
+@source './**/*.{ts,tsx}';
 `@source` '../../../packages/*/src/**/*.{ts,tsx}';
 `@source` '../node_modules/@sqlrooms/*/dist/';
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/ai-nextjs/src/globals.css` around lines 6 - 9, Remove the invalid
'../index.html' `@source` entry and fix the local TypeScript source pattern so it
doesn't double-prefix the src directory: in src/globals.css update the `@source`
directives by deleting the "@source '../index.html';" line and change "@source
'src/**/*.{ts,tsx}';" to a relative pattern from this file such as "@source
'./**/*.{ts,tsx}';" so the TS/TSX files are resolved correctly; leave the
node_modules `@source` (currently "@source '../node_modules/@sqlrooms/*/dist/';")
as-is if it correctly points to dependencies.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@examples/ai-nextjs/src/globals.css`:
- Around line 6-9: Remove the invalid '../index.html' `@source` entry and fix the
local TypeScript source pattern so it doesn't double-prefix the src directory:
in src/globals.css update the `@source` directives by deleting the "@source
'../index.html';" line and change "@source 'src/**/*.{ts,tsx}';" to a relative
pattern from this file such as "@source './**/*.{ts,tsx}';" so the TS/TSX files
are resolved correctly; leave the node_modules `@source` (currently "@source
'../node_modules/@sqlrooms/*/dist/';") as-is if it correctly points to
dependencies.

In `@examples/nextjs/src/globals.css`:
- Around line 6-9: The `@source` pattern "src/**/*.{ts,tsx}" in globals.css is
resolving to examples/nextjs/src/src/**/* (skipping real app files); update that
line to target files relative to this stylesheet (for example change `@source`
'src/**/*.{ts,tsx}' to `@source` './**/*.{ts,tsx}') so Tailwind will scan the
actual TS/TSX files under src (also verify the other `@source` entries remain
correct).

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f24657 and 5490a06.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (26)
  • examples/ai-nextjs/app/page.tsx
  • examples/ai-nextjs/next-env.d.ts
  • examples/ai-nextjs/package.json
  • examples/ai-nextjs/src/app/api/chat/route.ts
  • examples/ai-nextjs/src/app/layout.tsx
  • examples/ai-nextjs/src/app/lib/tools.ts
  • examples/ai-nextjs/src/app/page.tsx
  • examples/ai-nextjs/src/app/store.ts
  • examples/ai-nextjs/src/components/WebSearchToolResult.tsx
  • examples/ai-nextjs/src/components/app-shell-client.tsx
  • examples/ai-nextjs/src/components/main-view.tsx
  • examples/ai-nextjs/src/components/room.tsx
  • examples/ai-nextjs/src/config.ts
  • examples/ai-nextjs/src/globals.css
  • examples/ai-nextjs/tsconfig.json
  • examples/nextjs/app/page.tsx
  • examples/nextjs/package.json
  • examples/nextjs/src/app/layout.tsx
  • examples/nextjs/src/app/page.tsx
  • examples/nextjs/src/app/store.ts
  • examples/nextjs/src/components/app-shell-client.tsx
  • examples/nextjs/src/components/main-view.tsx
  • examples/nextjs/src/components/room.tsx
  • examples/nextjs/src/globals.css
  • examples/nextjs/tsconfig.json
  • knip.json
💤 Files with no reviewable changes (2)
  • examples/ai-nextjs/app/page.tsx
  • examples/nextjs/app/page.tsx
✅ Files skipped from review due to trivial changes (1)
  • examples/ai-nextjs/src/app/layout.tsx

@ilyabo
ilyabo merged commit 1cbae5b into main Feb 26, 2026
7 checks passed
@ilyabo
ilyabo deleted the fix--Examples-tailwind-paths branch February 26, 2026 13:42
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