Skip to content

chore: Railway deployment config for docs#171

Merged
BillChirico merged 12 commits intomainfrom
feat/railway-docs-deploy
Mar 1, 2026
Merged

chore: Railway deployment config for docs#171
BillChirico merged 12 commits intomainfrom
feat/railway-docs-deploy

Conversation

@BillChirico
Copy link
Collaborator

Summary

Add Railway deployment configuration for Mintlify documentation site.

Changes

  • — Container config to run Mintlify dev server
  • — Railway build and deploy settings

Deployment

Once merged, docs can be deployed to Railway via:

Or connect the repo in Railway dashboard and auto-deploy on push.

Note: This requires the folder with Mintlify content (from PR #154) to be present.

Pip Build and others added 11 commits March 1, 2026 00:06
…move unused theme var

- FormFieldContext/FormItemContext: initialize to null, move null checks
  before context is accessed so useFormField() throws early if used outside
  its providers
- PopoverTitle: render <h2> instead of <div> for semantic correctness
- role-selector: clear stale roles (setRoles([])) before fetching new guild's
  role list to prevent stale IDs from being applied
- theme-toggle: remove unused 'theme' destructure from useTheme()
…variant in command.tsx

- DialogHeader (with sr-only title/description) must be a descendant of
  DialogContent for Radix Dialog accessibility (title/description bound to
  the dialog role via aria-labelledby/aria-describedby)
- **:data-[slot=command-input-wrapper]:h-12 was an invalid Tailwind variant;
  corrected to *:data-[slot=command-input-wrapper]:h-12
Copilot AI review requested due to automatic review settings March 1, 2026 05:57
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 1, 2026

Warning

Rate limit exceeded

@BillChirico has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 13 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between fc31df0 and e385af3.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (21)
  • docs/Dockerfile
  • railway.json
  • web/package.json
  • web/src/app/layout.tsx
  • web/src/components/dashboard/config-sections/AiSection.tsx
  • web/src/components/dashboard/config-sections/ModerationSection.tsx
  • web/src/components/dashboard/config-sections/NumberField.tsx
  • web/src/components/dashboard/config-sections/TriageSection.tsx
  • web/src/components/dashboard/config-sections/WelcomeSection.tsx
  • web/src/components/layout/header.tsx
  • web/src/components/providers.tsx
  • web/src/components/theme-provider.tsx
  • web/src/components/theme-toggle.tsx
  • web/src/components/ui/channel-selector.tsx
  • web/src/components/ui/checkbox.tsx
  • web/src/components/ui/command.tsx
  • web/src/components/ui/dialog.tsx
  • web/src/components/ui/form.tsx
  • web/src/components/ui/popover.tsx
  • web/src/components/ui/role-selector.tsx
  • web/src/components/ui/switch.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/railway-docs-deploy

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.

@BillChirico BillChirico merged commit 197c859 into main Mar 1, 2026
6 of 12 checks passed
@BillChirico BillChirico deleted the feat/railway-docs-deploy branch March 1, 2026 06:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Railway deployment configuration intended for a Mintlify docs site, and also introduces a set of new/updated web UI components (theme support, Radix-based primitives, and dashboard config form/selector refactors).

Changes:

  • Add Railway build/deploy configuration pointing to a docs/Dockerfile for Mintlify.
  • Add theme provider + theme toggle and wire it into the app header/layout.
  • Add/adjust several UI primitives and dashboard config sections (switches, inputs, selectors, dialog/command/popover wrappers).

Reviewed changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
railway.json Railway build/deploy configuration (Dockerfile-based) for docs deployment.
docs/Dockerfile Container definition for running Mintlify in a Railway deployment.
web/package.json Adds cmdk + next-themes dependencies to support new UI/theme features.
pnpm-lock.yaml Lockfile updates for newly added dependencies.
web/src/app/layout.tsx Removes hard-coded dark class to allow theme provider to control theme.
web/src/components/theme-provider.tsx Adds a next-themes provider wrapper.
web/src/components/theme-toggle.tsx Adds theme toggle UI (light/dark/system).
web/src/components/providers.tsx Wraps app with ThemeProvider in addition to session + toaster.
web/src/components/layout/header.tsx Adds ThemeToggle to the header UI.
web/src/components/ui/dialog.tsx Refactors dialog wrapper implementation and adds optional close controls.
web/src/components/ui/command.tsx Adds CmdK-based command components and a command dialog wrapper.
web/src/components/ui/popover.tsx Adds popover wrapper components.
web/src/components/ui/switch.tsx Adds a switch wrapper component used by dashboard sections.
web/src/components/ui/checkbox.tsx Adds a checkbox wrapper component.
web/src/components/ui/form.tsx Adds react-hook-form helpers/components (FormField, FormLabel, etc.).
web/src/components/ui/role-selector.tsx Adds a Discord role multi-select component with async loading.
web/src/components/ui/channel-selector.tsx Adds a Discord channel multi-select component with filtering and async loading.
web/src/components/dashboard/config-sections/WelcomeSection.tsx Refactors to use shared Switch, Label, Textarea UI components.
web/src/components/dashboard/config-sections/TriageSection.tsx Refactors inputs/toggles to use shared UI primitives.
web/src/components/dashboard/config-sections/ModerationSection.tsx Refactors inputs/toggles to use shared UI primitives.
web/src/components/dashboard/config-sections/AiSection.tsx Refactors AI enabled toggle to use shared Switch + Label.
web/src/components/dashboard/config-sections/NumberField.tsx Refactors numeric input to use shared Input + Label and generated ids.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (5)

web/src/components/layout/header.tsx:51

  • ThemeToggle is now rendered in Header, but there are existing component tests for Header/Providers and this new behavior isn’t covered. Please add/update tests (and any needed next-themes mocks/providers) to ensure the theme toggle renders and basic interactions work.
      <div className="ml-auto flex items-center gap-4">
        <ThemeToggle />
        {status === 'loading' && (

web/src/components/theme-toggle.tsx:45

  • The Moon icon is absolutely positioned, but the wrapping Button doesn’t apply a positioning context (e.g. relative). As a result, the Moon SVG may position relative to an ancestor/page instead of the button. Add a positioning class to the button (or otherwise ensure the icon is positioned relative to the trigger).
        <Button variant="ghost" size="icon">
          <Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
          <Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
          <span className="sr-only">Toggle theme</span>
        </Button>

docs/Dockerfile:6

  • With Railway building from the repo root and pointing at docs/Dockerfile, COPY . . in that Dockerfile will copy the entire repository into the image (not just docs/). That increases build time/image size and can unintentionally include unrelated files. Consider adjusting the Dockerfile (or Railway build context) to copy only the docs subtree needed to run Mintlify.
WORKDIR /app
RUN npm install -g mintlify@latest
COPY . .
EXPOSE 3000

railway.json:3

  • The PR title/description focus on Railway docs deployment, but this PR also includes substantial unrelated web UI/theme changes. Please update the PR description/title to reflect the expanded scope, or split into separate PRs so the deployment config can be reviewed/reverted independently.
{
  "$schema": "https://railway.app/railway.schema.json",
  "build": {

docs/Dockerfile:4

  • The RUN npm install -g mintlify@latest step pulls a third-party CLI from npm using the mutable latest tag, which exposes this image to a supply-chain attack if the mintlify package or its tag is ever compromised. Because this package is installed and then executed with full privileges inside the container, a malicious update could run arbitrary code and access any secrets available at build or runtime. Pin mintlify to a specific trusted version (and update it intentionally) instead of relying on the floating latest tag.
RUN npm install -g mintlify@latest

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

'use client';

import * as React from 'react';
import type { Label as LabelPrimitive } from 'radix-ui';
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

LabelPrimitive is imported with import type, but it’s later referenced via typeof LabelPrimitive.Root (which requires a value import). This will cause a TypeScript error because type-only imports can’t be used in typeof queries. Import Label as a value (or change the prop typing to use a non-Radix label type, since the component renders the local Label).

Suggested change
import type { Label as LabelPrimitive } from 'radix-ui';
import { Label as LabelPrimitive } from 'radix-ui';

Copilot uses AI. Check for mistakes.
@greptile-apps
Copy link

greptile-apps bot commented Mar 1, 2026

Greptile Summary

This PR has a critical scope mismatch. While titled "chore: Railway deployment config for docs", it actually contains 1,495 insertions across 22 files, with the vast majority being a complete shadcn/ui component migration and dark mode feature implementation.

What's actually in this PR:

  • Railway deployment config (docs/Dockerfile, railway.json) - ~18 lines
  • Complete shadcn/ui migration with new components (channel-selector.tsx, role-selector.tsx, form.tsx, command.tsx, dialog.tsx, etc.) - ~1,400+ lines
  • Dark mode theme system with next-themes integration
  • Dashboard component refactoring to use new UI components
  • Multiple bug fixes for the new components

The Railway deployment files are correct, but this PR violates best practices by:

  1. Mixing infrastructure changes with major feature development
  2. Having a misleading title that doesn't reflect 99% of the changes
  3. Making the PR difficult to review, test, and potentially revert
  4. Combining ~12 separate commits that should likely be separate PRs

Code quality: The individual changes are well-implemented with proper TypeScript types, error handling, accessibility features, and follow project conventions. The shadcn/ui components include proper abort controller cleanup, null guards, and ARIA labels.

Recommendation: Consider splitting this into separate PRs - one for Railway deployment and another for the shadcn/ui migration. This would make review, testing, and potential rollback much more manageable.

Confidence Score: 3/5

  • Safe to merge from a code quality perspective, but violates PR best practices due to scope issues
  • Code changes are well-implemented with proper error handling and TypeScript types, but the PR mixes unrelated changes (Railway deployment + major UI migration) which creates risk for review completeness, testing coverage, and future maintenance. Score reflects good code quality but poor PR organization.
  • No files have code quality issues, but review the PR scope and consider splitting into separate PRs

Important Files Changed

Filename Overview
docs/Dockerfile Adds Docker container config for Mintlify dev server deployment - correctly configured
railway.json Railway deployment configuration - properly structured with restart policy
web/src/components/ui/channel-selector.tsx New channel selector component - well-structured with proper error handling and TypeScript types
web/src/components/ui/role-selector.tsx New role selector component - includes proper abort controller cleanup and accessibility labels
web/src/components/theme-toggle.tsx Theme toggle component - properly prevents hydration mismatch with mounted state
web/src/app/layout.tsx Removes hardcoded dark class to allow dynamic theme switching - correct change

Last reviewed commit: e385af3

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.

2 participants