Skip to content

refactor: consolidate setup/teardown docs to docs site - #764

Merged
saddlepaddle merged 3 commits into
mainfrom
setupsh
Jan 15, 2026
Merged

saddlepaddle merged 3 commits into
mainfrom
setupsh

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Jan 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Consolidates setup/teardown scripts documentation to the docs site, eliminating duplicate content and establishing a single source of truth.

Changes

  • Removed duplicate content: Deleted apps/marketing/src/app/scripts/page.tsx
  • Updated constants: Changed SCRIPTS_URL from superset.sh/scripts to ${process.env.NEXT_PUBLIC_DOCS_URL}/setup-teardown-scripts
  • Desktop app integration: Added NEXT_PUBLIC_DOCS_URL to:
    • CI workflow (.github/workflows/build-desktop.yml)
    • Electron config main section
    • Electron config renderer section
  • Docs site: Content already exists at apps/docs/content/docs/setup-teardown-scripts.mdx

Result

  • ✅ Single source of truth: docs.superset.sh/setup-teardown-scripts
  • ✅ Links work in dev (localhost:3004) and prod (docs.superset.sh)
  • ✅ No content duplication
  • ✅ CI/CD properly configured

Testing

  • Desktop app "Learn More" links in SetupConfigModal and ConfigFilePreview will now open docs site
  • Environment variable flows correctly through build pipeline

Summary by CodeRabbit

  • Documentation

    • Setup & teardown scripts documentation moved to the docs portal (docs.superset.sh); the in-app marketing page was removed.
  • Chores

    • Desktop app now opens the centralized docs URL for script guidance and related links.
    • Build configuration updated to reference the centralized documentation URL.

✏️ Tip: You can customize this high-level summary in your review settings.

- Move setup/teardown scripts documentation from marketing to docs site
- Update SCRIPTS_URL to point to docs.superset.sh/setup-teardown-scripts
- Add NEXT_PUBLIC_DOCS_URL to desktop build CI and electron config
- Remove duplicate content from marketing site
- Single source of truth: docs.superset.sh/setup-teardown-scripts
@coderabbitai

coderabbitai Bot commented Jan 15, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Adds NEXT_PUBLIC_DOCS_URL to CI and Vite builds, exposes it to desktop main/renderer configs, removes the marketing Scripts page and the shared COMPANY.SCRIPTS_URL constant, and updates desktop UI components to use a new EXTERNAL_LINKS.SETUP_TEARDOWN_SCRIPTS built from NEXT_PUBLIC_DOCS_URL.

Changes

Cohort / File(s) Summary
Build workflow
\.github/workflows/build-desktop.yml
Replaced NEXT_PUBLIC_WEB_URL with NEXT_PUBLIC_DOCS_URL in the desktop compile step environment variables.
Electron Vite config
apps/desktop/electron.vite.config.ts
Added process.env.NEXT_PUBLIC_DOCS_URL via defineEnv(...) (default https://docs.superset.sh) to both main and renderer define blocks so the env is available at build time.
Removed marketing page
apps/marketing/src/app/scripts/page.tsx
Deleted the Scripts documentation page and its example constants (CONFIG_EXAMPLE, SHELL_SCRIPT_EXAMPLE).
Shared constants (public)
packages/shared/src/constants.ts
Removed COMPANY.SCRIPTS_URL from the exported constants object.
Desktop shared constants
apps/desktop/src/shared/constants.ts
Added exported EXTERNAL_LINKS with SETUP_TEARDOWN_SCRIPTS constructed from NEXT_PUBLIC_DOCS_URL + "/setup-teardown-scripts".
Desktop UI components
apps/desktop/src/renderer/components/ConfigFilePreview/ConfigFilePreview.tsx, apps/desktop/src/renderer/components/SetupConfigModal/SetupConfigModal.tsx
Replaced imports of COMPANY with EXTERNAL_LINKS and updated Learn More handlers to open EXTERNAL_LINKS.SETUP_TEARDOWN_SCRIPTS.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐇 I hopped through files to change a string,
Swapped a constant for an env-born link.
Docs now point where build winds blow,
I nibble carrots, then I go —
Hooray for tidy code in sync! ✨

🚥 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
Title check ✅ Passed The title accurately summarizes the main objective of consolidating setup/teardown documentation to the docs site, which is the primary change across all modified files.
Description check ✅ Passed The description is comprehensive and well-structured, covering all key aspects: summary, changes, integration points, results, and testing notes. It goes beyond the template requirements with detailed context.

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

✨ Finishing touches
  • 📝 Generate docstrings

🧹 Recent nitpick comments
apps/desktop/src/shared/constants.ts (1)

51-55: Pattern is acceptable given Vite's environment variable handling.

The direct process.env.NEXT_PUBLIC_DOCS_URL access differs from the env module pattern used elsewhere (lines 12, 25, 31), but this is not problematic. The Vite config defines this variable in its define block with a fallback to "https://docs.superset.sh", ensuring the value is never undefined—Vite replaces it at build time in the renderer and it's available at runtime in the main process.

For consistency with other shared constants, consider adding NEXT_PUBLIC_DOCS_URL to env.shared.ts and using it here, but this is optional and not required for correctness.


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3a084c7 and c4566b4.

📒 Files selected for processing (3)
  • apps/desktop/src/renderer/components/ConfigFilePreview/ConfigFilePreview.tsx
  • apps/desktop/src/renderer/components/SetupConfigModal/SetupConfigModal.tsx
  • apps/desktop/src/shared/constants.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/desktop/src/renderer/components/SetupConfigModal/SetupConfigModal.tsx
  • apps/desktop/src/renderer/components/ConfigFilePreview/ConfigFilePreview.tsx
🧰 Additional context used
📓 Path-based instructions (4)
apps/desktop/**/*.{ts,tsx}

📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)

apps/desktop/**/*.{ts,tsx}: For Electron interprocess communication, ALWAYS use tRPC as defined in src/lib/trpc
Use alias as defined in tsconfig.json when possible
Prefer zustand for state management if it makes sense. Do not use effect unless absolutely necessary.
For tRPC subscriptions with trpc-electron, ALWAYS use the observable pattern from @trpc/server/observable instead of async generators, as the library explicitly checks isObservable(result) and throws an error otherwise

Files:

  • apps/desktop/src/shared/constants.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use object parameters for functions with 2+ parameters instead of positional arguments
Functions with 2+ parameters should accept a single params object with named properties for self-documentation and extensibility
Use prefixed console logging with context pattern: [domain/operation] message
Extract magic numbers and hardcoded values to named constants at module top
Use lookup objects/maps instead of repeated if (type === ...) conditionals
Avoid using any type - maintain type safety in TypeScript code
Never swallow errors silently - at minimum log them with context
Import from concrete files directly when possible - avoid barrel file abuse that creates circular dependencies
Avoid deep nesting (4+ levels) - use early returns, extract functions, and invert conditions
Use named properties in options objects instead of boolean parameters to avoid boolean blindness

Files:

  • apps/desktop/src/shared/constants.ts
apps/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Drizzle ORM for all database operations - never use raw SQL

Files:

  • apps/desktop/src/shared/constants.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Biome for formatting and linting - run at root level with bun run lint:fix or biome check --write

Files:

  • apps/desktop/src/shared/constants.ts
🧠 Learnings (2)
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/renderer/**/*.{ts,tsx} : Never import Node.js modules (fs, path, os, net) in renderer process or shared code - they are externalized for browser compatibility

Applied to files:

  • apps/desktop/src/shared/constants.ts
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to **/*.{ts,tsx} : Extract magic numbers and hardcoded values to named constants at module top

Applied to files:

  • apps/desktop/src/shared/constants.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Deploy Docs
  • GitHub Check: Deploy Marketing
  • GitHub Check: Deploy Admin
  • GitHub Check: Deploy Web
  • GitHub Check: Deploy API
  • GitHub Check: Build

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

- Remove SCRIPTS_URL from packages/shared/src/constants.ts (too targeted)
- Update desktop components to construct docs URL directly
- Components now use process.env.NEXT_PUBLIC_DOCS_URL inline
@github-actions

github-actions Bot commented Jan 15, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch
  • ✅ Electric Fly.io app

Thank you for your contribution! 🎉

- Create EXTERNAL_LINKS section in desktop shared/constants.ts
- Add SETUP_TEARDOWN_SCRIPTS constant pointing to docs site
- Update SetupConfigModal to use EXTERNAL_LINKS constant
- Update ConfigFilePreview to use EXTERNAL_LINKS constant
- Centralized external link management for desktop app
@saddlepaddle
saddlepaddle merged commit facd7a5 into main Jan 15, 2026
13 checks passed
@Kitenite
Kitenite deleted the setupsh branch January 16, 2026 18:59

This branch was previously deployed

1 inactive deployment
preview — c4566b48 Deployed Jan 15, 2026 by saddlepaddle via Deploy Docs #875
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