Repository navigation
fix: Examples tailwind paths - #387
Conversation
Signed-off-by: Ilya Boyandin <[email protected]>
📝 WalkthroughWalkthroughThis pull request simplifies CSS Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (7)
examples/minimal/src/index.css (1)
8-8: Same change asexamples/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 asexamples/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 asexamples/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 asexamples/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 asexamples/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 asexamples/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 asexamples/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@sourcepattern correctly.Note: the guide example uses
./**/*.{ts,tsx}(Line 47) while the actual example CSS files still usesrc/**/*.{ts,tsx}(unchanged line 6 in the CSS files). These resolve differently when the CSS file itself lives insrc/—./**/*.{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
📒 Files selected for processing (25)
apps/sqlrooms-cli-ui/src/style.cssdocs/upgrade-guide.mdexamples/ai-agent/src/index.cssexamples/ai-core/src/index.cssexamples/ai-nextjs/app/globals.cssexamples/ai-rag/src/index.cssexamples/ai/src/index.cssexamples/app-builder/src/index.cssexamples/canvas-sync/src/index.cssexamples/canvas/src/index.cssexamples/cosmos-embedding/src/index.cssexamples/cosmos/src/index.cssexamples/deckgl-discuss/src/index.cssexamples/deckgl-mosaic/src/index.cssexamples/deckgl/src/index.cssexamples/get-started/src/index.cssexamples/kepler/src/index.cssexamples/minimal/src/index.cssexamples/mosaic/src/index.cssexamples/multi-room/src/index.cssexamples/nextjs/app/globals.cssexamples/query-motherduck/src/index.cssexamples/query-pwa/src/index.cssexamples/query-websocket/src/index.cssexamples/query/src/index.css
Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>
There was a problem hiding this comment.
♻️ Duplicate comments (2)
examples/nextjs/src/globals.css (1)
6-9:⚠️ Potential issue | 🟠 MajorFix local
@sourcepath so Tailwind scans real app files.Line 7 likely targets
src/src/**/*from this stylesheet location, which can skip actual files undersrc/app/src/componentsand 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 | 🟠 MajorLine 7
@sourcepath 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 resolvesrc/src/**/*.{ts,tsx}, which doesn't exist. Additionally, line 6 references../index.html(which resolves to the project root), but noindex.htmlfile exists in theexamples/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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (26)
examples/ai-nextjs/app/page.tsxexamples/ai-nextjs/next-env.d.tsexamples/ai-nextjs/package.jsonexamples/ai-nextjs/src/app/api/chat/route.tsexamples/ai-nextjs/src/app/layout.tsxexamples/ai-nextjs/src/app/lib/tools.tsexamples/ai-nextjs/src/app/page.tsxexamples/ai-nextjs/src/app/store.tsexamples/ai-nextjs/src/components/WebSearchToolResult.tsxexamples/ai-nextjs/src/components/app-shell-client.tsxexamples/ai-nextjs/src/components/main-view.tsxexamples/ai-nextjs/src/components/room.tsxexamples/ai-nextjs/src/config.tsexamples/ai-nextjs/src/globals.cssexamples/ai-nextjs/tsconfig.jsonexamples/nextjs/app/page.tsxexamples/nextjs/package.jsonexamples/nextjs/src/app/layout.tsxexamples/nextjs/src/app/page.tsxexamples/nextjs/src/app/store.tsexamples/nextjs/src/components/app-shell-client.tsxexamples/nextjs/src/components/main-view.tsxexamples/nextjs/src/components/room.tsxexamples/nextjs/src/globals.cssexamples/nextjs/tsconfig.jsonknip.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
Summary by CodeRabbit
Release Notes
Refactor
Chores