Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .cursor/agents/thermo-nuclear-code-quality-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: thermo-nuclear-code-quality-review
description: Thermo-nuclear code quality audit (maintainability, structure, 1k-line rule, spaghetti, code-judo). Use for deep maintainability reviews, harsh code quality audits, or when the user asks for thermo-nuclear review.
---

# Thermo-Nuclear Code Quality Review

You are a **Task subagent** for arr-dashboard. Read `~/.cursor/skills/thermo-nuclear-code-quality-review/SKILL.md` as the complete rubric.

Apply the rubric to assigned files. Output findings in rubric priority order. When asked to implement fixes, make minimal behavior-preserving structural improvements: decompose files over 1k lines, delete duplicate modules, extract helpers, collapse spaghetti branches.

Do not spawn nested subagents unless explicitly asked.
52 changes: 52 additions & 0 deletions .cursor/skills/thermo-nuclear-code-quality-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: thermo-nuclear-code-quality-review
description: Run an extremely strict maintainability review for abstraction quality, giant files, and spaghetti-condition growth. Use for a thermo-nuclear code quality review, thermonuclear review, deep code quality audit, or especially harsh maintainability review.
disable-model-invocation: true
---

# Thermo-Nuclear Code Quality Review

Use this skill for an unusually strict review focused on implementation quality, maintainability, abstraction quality, and codebase health.

Above all, this skill should push the reviewer to be **ambitious** about code structure. Do not merely identify local cleanup opportunities. Actively search for "code judo" moves: restructurings that preserve behavior while making the implementation dramatically simpler, smaller, more direct, and more elegant.

## Core Prompt

Start from this baseline:

> Perform a deep code quality audit of the current branch's changes.
> Rethink how to structure / implement the changes to meaningfully improve code quality without impacting behavior.
> Work to improve abstractions, modularity, reduce Spaghetti code, improve succinctness and legibility.
> Be ambitious, if there is a clear path to improving the implementation that involves restructuring some of the codebase, go for it.
> Be extremely thorough and rigorous. Measure twice, cut once.

## Non-Negotiable Additional Standards

Apply the baseline prompt above, plus these explicit review rules:

0. **Be ambitious about structural simplification.**
1. **Do not let a PR push a file from under 1k lines to over 1k lines without a very strong reason.**
2. **Do not allow random spaghetti growth in existing code.**
3. **Bias toward cleaning the design, not just accepting working code.**
4. **Prefer direct, boring, maintainable code over hacky or magical code.**
5. **Push hard on type and boundary cleanliness when they affect maintainability.**
6. **Keep logic in the canonical layer and reuse existing helpers.**
7. **Treat unnecessary sequential orchestration and non-atomic updates as design smells when the cleaner structure is obvious.**

See the full rubric at `~/.cursor/skills/thermo-nuclear-code-quality-review/SKILL.md`.

## Output Expectations

Prioritize findings in this order:

1. Structural code-quality regressions
2. Missed opportunities for dramatic simplification / code-judo restructuring
3. Spaghetti / branching complexity increases
4. Boundary / abstraction / type-contract problems
5. File-size and decomposition concerns
6. Modularity and abstraction issues
7. Legibility and maintainability concerns

## Approval Bar

Do not approve merely because behavior seems correct. Block on unjustified file-size explosion, spaghetti growth, duplicate modules, and missed decomposition opportunities.
33 changes: 12 additions & 21 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# ─── Required ────────────────────────────────────────────────────────────────
# For direct non-installer startup, get these from your Radarr/Sonarr/Lidarr settings > General > API Key.
# Web installer flow can populate these interactively at first run, so they can remain blank.
# ─── Setup / onboarding ──────────────────────────────────────────────────────
INSTALLER_ENABLED=true
SETUP_BOOTSTRAP_TOKEN=

# ─── Arr services ────────────────────────────────────────────────────────────
# Get these from Radarr/Sonarr/Lidarr settings > General > API Key.
# They can stay blank for first boot; finish setup from the dashboard UI.
RADARR_API_KEY=
SONARR_API_KEY=
LIDARR_API_KEY=
Expand All @@ -13,29 +17,16 @@ LIDARR_API_KEY=
# LIDARR_HOST=http://lidarr:8686
# QBITTORRENT_HOST=http://qbittorrent:8080
# SLSKD_HOST=http://slskd:5030
# PROWLARR_HOST=http://prowlarr:9696

# ─── API Keys / Credentials (optional overrides) ───────────────────────────
# ─── qBittorrent (required for torrent download tracking) ────────────────────
# QBITTORRENT_USER=admin
# QBITTORRENT_PASS=adminadmin
# SLSKD_API_KEY=
# PROWLARR_API_KEY=

# ─── Installer mode ─────────────────────────────────────────────────────────
# Fresh installs default to web onboarding in the dashboard Settings view.
# Set to false only if you are supplying the required Arr API keys yourself.
INSTALLER_ENABLED=true

# Dashboard UI port mapped to the host by the frontend container.
DASHBOARD_PORT=8888

# ─── Installer state (web-installer-first path) ───────────────────────────
INSTALLER_STATE_HOST_PATH=./backend/installer-state.json
INSTALLER_STATE_PATH=/app/installer-state.json

# Compose creates or reuses this named bridge network automatically.
ARR_NETWORK_NAME=arr-network
# ─── SLSKD / Soulseek (required for Soulseek download tracking) ─────────────
# SLSKD_API_KEY=

# ─── Server ──────────────────────────────────────────────────────────────────
# PORT=3000
# NODE_ENV=development
# DASHBOARD_PORT=8888
# ARR_NETWORK_NAME=arr-dashboard-network
45 changes: 4 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,11 @@ name: CI

on:
push:
branches: [main, master]
branches: [main]
pull_request:
branches: [main, master]
branches: [main]

jobs:
docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Reject stale repository URLs in docs
shell: bash
run: |
set -euo pipefail
origin_url="$(git remote get-url origin)"
canonical_url="${origin_url%.git}"
canonical_url="${canonical_url/git@github.com:/https://github.com/}"
canonical_url="${canonical_url}.git"
allowed_placeholder='https://github.com/YOUR_GITHUB_USERNAME/vibarr.git'
scan_paths=()
for path in README.md SETUP.md CONTRIBUTING.md docs .env.example install.sh .github; do
if [ -e "$path" ]; then
scan_paths+=("$path")
fi
done

matches="$(grep -RInE 'https://github\.com/[^/]+/vibarr\.git|https://raw\.githubusercontent\.com/[^/]+/vibarr/' "${scan_paths[@]}" || true)"

if [ -z "$matches" ]; then
exit 0
fi

bad_matches="$(printf '%s\n' "$matches" | grep -vF "$canonical_url" | grep -vF "$allowed_placeholder" || true)"

if [ -n "$bad_matches" ]; then
echo "Found stale or non-canonical repository URLs:"
printf '%s\n' "$bad_matches"
echo "Canonical URL is: $canonical_url"
exit 1
fi

frontend:
runs-on: ubuntu-latest
defaults:
Expand All @@ -64,15 +27,15 @@ jobs:
run: npm ci

- name: Test
run: npm test
run: npm test -- --reporter=verbose

- name: Build
run: npm run build

- name: Verify bundle
run: |
ls -la dist/assets/
grep -c "vibarr\\|Library\\|TorrentTable" dist/assets/index-*.js
grep -c "Icarus\\|Library\\|TorrentTable" dist/assets/index-*.js

backend:
runs-on: ubuntu-latest
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@ frontend/dist/
*.sublime-project
*.sublime-workspace
.DS_Store
._*
Thumbs.db

# ─── Runtime data (mounted volumes) ──────────────────────────────────────────
# These are bind-mounted at runtime; checked in only as examples
activity-log.json
bandwidth-lifetime.json
installer-state.json

# ─── Logs ────────────────────────────────────────────────────────────────────
logs/
Expand All @@ -46,6 +44,7 @@ npm-debug.log*
.claude/
.codebase-memory/
CLAUDE.md
CHANGELOG.md
DOWNLOAD_FLOW.md
docs/
*.prefix-*
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to vibarr
# Contributing to arr-dashboard

Thank you for considering contributing! This document outlines the guidelines.

Expand Down
Loading
Loading