Repository navigation
docs: Deploy docs only on docs changes or manual trigger - #422
Conversation
Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>
📝 WalkthroughWalkthroughThese changes refine CI/CD workflows by updating trigger paths and media references in deploy-docs, and removing Git LFS handling while adding netlify.toml generation and automated dependency versioning based on lerna.json in sync-examples. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/deploy-docs.yml (1)
7-9:⚠️ Potential issue | 🟠 MajorKeep TypeDoc inputs in the deploy trigger.
This workflow still regenerates
docs/api/**from package sources (pnpm run docs:build:typedoc), so dropping non-docs/**inputs here means API docs stop updating when packages or docs-build config change.Suggested trigger adjustment
push: branches: - main paths: - 'docs/**' + - 'packages/**' + - 'package.json' + - 'pnpm-lock.yaml' + - 'turbo.json' - '.github/workflows/deploy-docs.yml'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/deploy-docs.yml around lines 7 - 9, The deploy-docs workflow removed inputs that trigger TypeDoc rebuilds; update the paths array in the deploy-docs workflow to include package source and docs-build config changes so pnpm run docs:build:typedoc still runs when relevant code/config changes — e.g., re-add patterns for package sources (packages/** or your monorepo package folders), root manifest/lock files (package.json, pnpm-lock.yaml) and any TypeScript/TypeDoc config files used by the build (tsconfig*.json, typedoc.json), ensuring the existing docs/** and the workflow file remain listed so API docs regenerate correctly when package or config changes occur.
🧹 Nitpick comments (2)
.github/workflows/sync-examples.yml (2)
100-110: Consider error handling for lockfile generation.If
npm install --package-lock-onlyfails for an example, the loop continues silently. This could result in examples being synced without valid lockfiles.♻️ Add error handling to fail fast on npm errors
# Generate lockfiles for each example find target -name "package.json" -type f | while read -r file; do dir=$(dirname "$file") # Skip if it's a nested node_modules if [[ ! "$dir" =~ node_modules ]]; then echo "Generating lockfile for $dir" - cd "$dir" - npm install --package-lock-only --legacy-peer-deps - cd - > /dev/null + (cd "$dir" && npm install --package-lock-only --legacy-peer-deps) || { + echo "Failed to generate lockfile for $dir" + exit 1 + } fi done🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/sync-examples.yml around lines 100 - 110, The lockfile generation loop currently ignores failures from npm; update the loop that reads package.json files (the while read -r file block that computes dir=$(dirname "$file"), cds into "$dir" and runs npm install --package-lock-only --legacy-peer-deps) to detect npm failures and fail fast: after running npm install check its exit status (or enable set -e before the loop) and if it fails, print an error including the directory and exit non-zero so the workflow stops instead of continuing silently.
67-79: Heredoc indentation will be included in the generated file.The leading spaces (from YAML indentation) will be written literally into
netlify.toml. While TOML parsers typically handle this, it results in an oddly formatted config file.♻️ Consider using a tab-stripped heredoc or removing indentation
if [ ! -f "$NETLIFY_FILE" ]; then - cat <<'EOF' > "$NETLIFY_FILE" - [build] - command = "npm run build" - publish = "dist" - - [build.environment] - NODE_VERSION = "24.11.1" - NODE_OPTIONS = "--max_old_space_size=4096" - NPM_FLAGS = "--force" # Override dependency constraints - CI = "false" # This will prevent treating warnings as errors - - EOF + cat > "$NETLIFY_FILE" << 'EOF' +[build] + command = "npm run build" + publish = "dist" + +[build.environment] + NODE_VERSION = "24.11.1" + NODE_OPTIONS = "--max_old_space_size=4096" + NPM_FLAGS = "--force" # Override dependency constraints + CI = "false" # This will prevent treating warnings as errors +EOF fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/sync-examples.yml around lines 67 - 79, The heredoc invoked with cat <<'EOF' > "$NETLIFY_FILE" preserves the YAML indentation into netlify.toml; update the heredoc invocation to strip leading indentation (e.g., use a tab-stripping form like cat <<-'EOF' > "$NETLIFY_FILE" and ensure indentation uses tabs, or remove all leading spaces so the heredoc content lines start at column 0) so the generated NETLIFY_FILE contains clean, unindented TOML; adjust the existing heredoc block around the cat <<'EOF' > "$NETLIFY_FILE" marker accordingly.
🤖 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/README.md`:
- Line 9: Replace the invalid alt usage on the <video> element by providing
proper accessible alternatives: wrap the video in a <figure> with a <figcaption>
(or add aria-describedby pointing to a nearby description), add a <source> child
for the mp4, and include a <track kind="captions"> with an English VTT file
(e.g., ai-example.en.vtt) so captions are available; alternatively include or
link a text transcript below the video for non-audio content. Ensure the
existing <video> tag in examples/ai/README.md is updated to remove the alt
attribute and include the figure/figcaption, source, and track elements (or a
transcript) so it meets WCAG guidelines.
In `@examples/app-builder/README.md`:
- Line 6: The <video> element in the README uses an unsupported alt attribute;
replace alt with an accessible label by adding an aria-label on the <video> tag
(e.g., aria-label="SQLRooms AI App builder demo"), and also add captions via a
<track kind="captions"> child or include a short descriptive transcript/caption
text adjacent to the <video> element to meet accessibility requirements; update
the <video> element in the README accordingly (refer to the <video> tag in the
diff).
---
Outside diff comments:
In @.github/workflows/deploy-docs.yml:
- Around line 7-9: The deploy-docs workflow removed inputs that trigger TypeDoc
rebuilds; update the paths array in the deploy-docs workflow to include package
source and docs-build config changes so pnpm run docs:build:typedoc still runs
when relevant code/config changes — e.g., re-add patterns for package sources
(packages/** or your monorepo package folders), root manifest/lock files
(package.json, pnpm-lock.yaml) and any TypeScript/TypeDoc config files used by
the build (tsconfig*.json, typedoc.json), ensuring the existing docs/** and the
workflow file remain listed so API docs regenerate correctly when package or
config changes occur.
---
Nitpick comments:
In @.github/workflows/sync-examples.yml:
- Around line 100-110: The lockfile generation loop currently ignores failures
from npm; update the loop that reads package.json files (the while read -r file
block that computes dir=$(dirname "$file"), cds into "$dir" and runs npm install
--package-lock-only --legacy-peer-deps) to detect npm failures and fail fast:
after running npm install check its exit status (or enable set -e before the
loop) and if it fails, print an error including the directory and exit non-zero
so the workflow stops instead of continuing silently.
- Around line 67-79: The heredoc invoked with cat <<'EOF' > "$NETLIFY_FILE"
preserves the YAML indentation into netlify.toml; update the heredoc invocation
to strip leading indentation (e.g., use a tab-stripping form like cat <<-'EOF' >
"$NETLIFY_FILE" and ensure indentation uses tabs, or remove all leading spaces
so the heredoc content lines start at column 0) so the generated NETLIFY_FILE
contains clean, unindented TOML; adjust the existing heredoc block around the
cat <<'EOF' > "$NETLIFY_FILE" marker accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ca8f6e22-cfa1-4146-bfb3-5f429d86f8b7
⛔ Files ignored due to path filters (18)
docs/public/media/case-studies/cosmograph-2.0-967px.mp4is excluded by!**/*.mp4docs/public/media/case-studies/flowmap-city.mp4is excluded by!**/*.mp4docs/public/media/case-studies/transcality.mp4is excluded by!**/*.mp4docs/public/media/examples/ai-example-dark.mp4is excluded by!**/*.mp4docs/public/media/examples/ai-example-light.mp4is excluded by!**/*.mp4docs/public/media/examples/multi-room.mp4is excluded by!**/*.mp4docs/public/media/examples/sqlrooms-ai-app-builder-2x.mp4is excluded by!**/*.mp4docs/public/media/examples/sqlrooms-deckgl-mosaic-1500px.mp4is excluded by!**/*.mp4docs/public/media/key-concepts/room-shell.pngis excluded by!**/*.pngdocs/public/media/logo-large.pngis excluded by!**/*.pngdocs/public/media/offline/sqlrooms-query-pwa.pngis excluded by!**/*.pngdocs/public/media/overview/architecture.svgis excluded by!**/*.svgdocs/public/media/sqlrooms-examples-75.mp4is excluded by!**/*.mp4docs/public/media/sqlrooms-intro-2.mp4is excluded by!**/*.mp4docs/public/media/sqlrooms-query.mp4is excluded by!**/*.mp4docs/public/media/whats-new/commands.mp4is excluded by!**/*.mp4docs/public/media/whats-new/row-selection.pngis excluded by!**/*.pngdocs/public/media/whats-new/tab-strip-component.mp4is excluded by!**/*.mp4
📒 Files selected for processing (40)
.gitattributes.github/workflows/deploy-docs.yml.github/workflows/sync-examples.ymlCLAUDE.mdREADME.mddocs/public/media/case-studies/cosmograph.webpdocs/public/media/case-studies/flowmap-city.webpdocs/public/media/case-studies/fsq-spatial-desktop-earthquakes.webpdocs/public/media/case-studies/transcality.webpdocs/public/media/examples/ai-example.webpdocs/public/media/examples/cosmos-embedding-light.webpdocs/public/media/examples/cosmos-embedding.webpdocs/public/media/examples/cosmos-graph.webpdocs/public/media/examples/deckgl-discuss.webpdocs/public/media/examples/deckgl.webpdocs/public/media/examples/get-started.webpdocs/public/media/examples/kepler.webpdocs/public/media/examples/mosaic.webpdocs/public/media/examples/motherduck-example.webpdocs/public/media/examples/nextjs.webpdocs/public/media/examples/old-sqlrooms-ai.webpdocs/public/media/examples/rag.webpdocs/public/media/examples/sqlrooms-ai-example.webpdocs/public/media/examples/sqlrooms-query.webpdocs/public/media/overview/collage.webpexamples/ai-rag/README.mdexamples/ai/README.mdexamples/app-builder/README.mdexamples/cosmos-embedding/README.mdexamples/cosmos/README.mdexamples/deckgl-discuss/README.mdexamples/deckgl-mosaic/README.mdexamples/deckgl/README.mdexamples/kepler/README.mdexamples/mosaic/README.mdexamples/multi-room/README.mdexamples/nextjs/README.mdexamples/query-motherduck/README.mdexamples/query/README.mdscripts/update-readme.mjs
| [](https://app.netlify.com/projects/sqlrooms-ai/deploys) | ||
|
|
||
| <video src="/media/examples/ai-example-light.mp4" alt="SQLRooms AI example app" width="450" controls loop muted></video> | ||
| <video src="https://sqlrooms.org/media/examples/ai-example-light.mp4" alt="SQLRooms AI example app" width="450" controls loop muted></video> |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Does the HTML <video> element support an alt attribute? What is the recommended accessible way to provide a text description for embedded video in HTML?
💡 Result:
No. The HTML <video> element does not support an alt attribute (the alt attribute is defined for images like <img>, not for <video>). [1][2]
Recommended accessible approaches for text equivalents/descriptions of video:
- Provide captions using
<track kind="captions" ...>(for speech and meaningful sound). [3] - Provide a text transcript (often linked or placed immediately below the video). If important visual information isn’t conveyed in audio, use a descriptive transcript and/or audio description. [4][5]
- If you need to associate a longer description with the player in-page, reference nearby text with
aria-describedby(or use visible context such as a<figure>/<figcaption>). [4]
Example (captions + transcript/description):
<figure>
<video controls aria-describedby="video-desc">
<source src="demo.mp4" type="video/mp4">
<track kind="captions" src="demo.en.vtt" srclang="en" label="English captions">
</video>
<figcaption id="video-desc">
Transcript (includes description of key visuals): … <a href="demo-transcript.html">Read</a>
</figcaption>
</figure>Sources: WHATWG HTML Standard and related W3C HTML WG discussions on alt, plus W3C WAI and WebAIM guidance on transcripts/captions/audio description. [1][2][4][5]
[1] https://html.spec.whatwg.org/multipage/media.html
[2] https://www.w3.org/html/wg/wiki/ChangeProposals/PosterElement
[3] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
[4] https://www.w3.org/WAI/media/av/transcripts/
[5] https://webaim.org/techniques/captions/
Provide proper text alternatives for the video using captions or transcripts, not just aria-label.
The <video> element does not support the alt attribute. According to W3C Web Accessibility Guidelines, the proper approaches to make embedded video accessible are:
- Captions — Use
<track kind="captions">for speech and meaningful sounds - Transcripts — Provide a text transcript (linked or visible below the video), ideally descriptive if key visuals are not conveyed in audio
- Visible description — Wrap the video in a
<figure>with<figcaption>or usearia-describedbyto reference an adjacent description
Using aria-label alone is insufficient and does not meet accessibility standards. Consider restructuring with captions and/or a visible transcript:
<figure>
<video controls aria-describedby="video-desc" width="450">
<source src="https://sqlrooms.org/media/examples/ai-example-light.mp4" type="video/mp4">
<track kind="captions" src="ai-example.en.vtt" srclang="en" label="English">
</video>
<figcaption id="video-desc">
SQLRooms AI example app demo — demonstrates key features and usage patterns
</figcaption>
</figure>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@examples/ai/README.md` at line 9, Replace the invalid alt usage on the
<video> element by providing proper accessible alternatives: wrap the video in a
<figure> with a <figcaption> (or add aria-describedby pointing to a nearby
description), add a <source> child for the mp4, and include a <track
kind="captions"> with an English VTT file (e.g., ai-example.en.vtt) so captions
are available; alternatively include or link a text transcript below the video
for non-audio content. Ensure the existing <video> tag in examples/ai/README.md
is updated to remove the alt attribute and include the figure/figcaption,
source, and track elements (or a transcript) so it meets WCAG guidelines.
| | [Open in StackBlitz](https://stackblitz.com/github/sqlrooms/examples/tree/main/app-builder?embed=1&file=src/main.tsx) | ||
|
|
||
| <video src="/media/examples/sqlrooms-ai-app-builder-2x.mp4" alt="SQLRooms AI App builder" width="450" controls loop muted></video> | ||
| <video src="https://sqlrooms.org/media/examples/sqlrooms-ai-app-builder-2x.mp4" alt="SQLRooms AI App builder" width="450" controls loop muted></video> |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Does the HTML <video> element support an alt attribute? What is the recommended accessible way to provide a text description for embedded video in HTML?
💡 Result:
No. The HTML <video> element does not support an alt attribute—alt is for <img> (and certain image-type inputs), and the HTML spec’s <video> attributes do not include alt. [1]
Recommended accessible ways to provide a text description for video:
- Provide captions/subtitles via
<track>(for spoken dialog and important sounds). [1] - Provide a descriptive transcript in nearby HTML (a text alternative that includes dialog and key visual information). The HTML spec explicitly notes you can provide transcripts by linking to them in the prose near the
<video>element. [1] WAI recommends descriptive transcripts for broad accessibility needs. [2] - Provide audio description for important visual-only information, e.g. with a WebVTT description track (
<track kind="descriptions">) or an alternate described version of the video (noting native support can vary). [1] [3]
Example pattern:
<figure>
<video controls aria-describedby="vid-desc">
<source src="movie.mp4" type="video/mp4">
<track kind="captions" src="movie.en.vtt" srclang="en" label="English captions">
<track kind="descriptions" src="movie.en.desc.vtt" srclang="en" label="English audio description">
</video>
<figcaption id="vid-desc">
Short description of what the video shows.
<a href="#transcript">Read the descriptive transcript</a>
</figcaption>
</figure>
<section id="transcript">
<!-- descriptive transcript in HTML -->
</section>Sources: HTML Standard on media accessibility (captions, audio descriptions, transcripts near the video). [1] WAI guidance on transcripts. [2] WCAG technique for description tracks (kind="descriptions"). [3]
Replace alt on <video> with an accessible label.
alt is not supported on <video> elements, so this attribute will be ignored. For proper accessibility, use aria-label, provide captions with <track kind="captions">, or add a descriptive transcript near the video element.
♿ Suggested fix
-<video src="https://sqlrooms.org/media/examples/sqlrooms-ai-app-builder-2x.mp4" alt="SQLRooms AI App builder" width="450" controls loop muted></video>
+<video
+ src="https://sqlrooms.org/media/examples/sqlrooms-ai-app-builder-2x.mp4"
+ aria-label="SQLRooms AI App Builder demo"
+ width="450"
+ controls
+ loop
+ muted
>
+ SQLRooms AI App Builder demo
+</video>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <video src="https://sqlrooms.org/media/examples/sqlrooms-ai-app-builder-2x.mp4" alt="SQLRooms AI App builder" width="450" controls loop muted></video> | |
| <video | |
| src="https://sqlrooms.org/media/examples/sqlrooms-ai-app-builder-2x.mp4" | |
| aria-label="SQLRooms AI App Builder demo" | |
| width="450" | |
| controls | |
| loop | |
| muted | |
| > | |
| SQLRooms AI App Builder demo | |
| </video> |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@examples/app-builder/README.md` at line 6, The <video> element in the README
uses an unsupported alt attribute; replace alt with an accessible label by
adding an aria-label on the <video> tag (e.g., aria-label="SQLRooms AI App
builder demo"), and also add captions via a <track kind="captions"> child or
include a short descriptive transcript/caption text adjacent to the <video>
element to meet accessibility requirements; update the <video> element in the
README accordingly (refer to the <video> tag in the diff).
…-git-lfs-bandwidth Signed-off-by: Ilya Boyandin <[email protected]>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/sync-examples.yml (1)
84-98:⚠️ Potential issue | 🟠 MajorUpdate all
@sqlrooms/*dependency sections, not justdependencies.The
jqfilter on lines 90–97 only updates.dependencies. References indevDependencies,peerDependencies, oroptionalDependenciesremain asworkspace:*and will fail to resolve when line 108 runsnpm install --package-lock-onlyoutside the monorepo.Five manifests currently have
@sqlrooms/*entries in non-dependencies sections:
- Root
package.jsonalso lacks a.dependenciessection entirely (onlydevDependencies)packages/ai-core/package.json,packages/room-store/package.json:@sqlrooms/*indevDependenciespackages/duckdb/package.json:@sqlrooms/*indevDependenciespackages/duckdb-node/package.json:@sqlrooms/*inpeerDependenciesThe fix should iterate all four sections (
dependencies,devDependencies,peerDependencies,optionalDependencies) and handle manifests that lack a.dependenciessection:Suggested fix
- jq --arg version "$VERSION" \ - '(.dependencies | with_entries( - if .key | startswith("@sqlrooms/") - then .value = $version - else . - end - )) as $deps - | .dependencies = $deps' "$file" > temp.json + jq --arg version "$VERSION" ' + reduce ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"][] as $section + (.; + if .[$section] == null then . + else .[$section] |= with_entries( + if .key | startswith("@sqlrooms/") + then .value = $version + else . + end + ) + end + ) + ' "$file" > temp.json🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/sync-examples.yml around lines 84 - 98, The current jq invocation in the find loop only updates .dependencies and leaves workspace:* entries in devDependencies, peerDependencies, and optionalDependencies; update the jq filter used in the loop (the command that builds temp.json for each "$file") to process all four sections by mapping over [.dependencies, .devDependencies, .peerDependencies, .optionalDependencies] (creating missing objects if they don’t exist) and replace any keys starting with "@sqlrooms/" with $version in each section; keep the surrounding shell logic (VERSION=$(jq -r '.version' source/lerna.json), the find ... | while read -r file; do loop, temp.json mv "$file") but change only the jq expression so it updates or creates those sections for the given file variable.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In @.github/workflows/sync-examples.yml:
- Around line 84-98: The current jq invocation in the find loop only updates
.dependencies and leaves workspace:* entries in devDependencies,
peerDependencies, and optionalDependencies; update the jq filter used in the
loop (the command that builds temp.json for each "$file") to process all four
sections by mapping over [.dependencies, .devDependencies, .peerDependencies,
.optionalDependencies] (creating missing objects if they don’t exist) and
replace any keys starting with "@sqlrooms/" with $version in each section; keep
the surrounding shell logic (VERSION=$(jq -r '.version' source/lerna.json), the
find ... | while read -r file; do loop, temp.json mv "$file") but change only
the jq expression so it updates or creates those sections for the given file
variable.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6ccad7c1-74db-420c-947b-e3f7a301b84c
📒 Files selected for processing (1)
.github/workflows/sync-examples.yml
Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]> Signed-off-by: bdjulbic <[email protected]>
Summary by CodeRabbit