Skip to content

[codex] Refresh control room and addon workflows#1

Merged
appaKappaK merged 1 commit into
mainfrom
codex/control-room-refresh
Mar 29, 2026
Merged

[codex] Refresh control room and addon workflows#1
appaKappaK merged 1 commit into
mainfrom
codex/control-room-refresh

Conversation

@appaKappaK
Copy link
Copy Markdown
Owner

@appaKappaK appaKappaK commented Mar 29, 2026

Summary

  • Refresh the control room around the newer Go-first workflow: move the entrypoint into cmd/tmodloader-ui, move app/backend code into internal/controlroom, remove legacy interactive-shell fallback paths, and keep the shell hub focused on automation and direct command entrypoints.
  • Restore and expand native control-room workflows for Workshop URL/ID queueing, installed-mod management, per-mod config editing, addon manifests under Addons/*/addon.json, clearer addon troubleshooting, cleaner command output, and better status/snapshot behavior.
  • Update the surrounding docs and repo housekeeping so the README, man page, shell help, contributing docs, PR template, changelog, and .gitignore all match the current self-contained layout and feature set.

Validation

  • bash -n checks run for touched scripts
  • relevant command or menu path tested
  • README/docs updated if behavior changed

Also ran:

  • go test ./...
  • go build ./...
  • groff -man -Tutf8 man/tmod-control.1
  • git diff --check

Notes

  • portability impact: keeps the repo-root self-contained layout, moves Go source out of the top level, and keeps local build/runtime artifacts out of git.
  • migration/setup impact: interactive launches now go straight to the Go control room; use make tui-run or make tui-build as needed, and place addon manifests under Addons/<name>/addon.json.
  • follow-up work: expand the addon framework beyond command-style actions if needed, and keep adding live smoke coverage for new interactive flows.

Summary by CodeRabbit

  • New Features

    • Added addon system for extending the Go control room with custom actions via manifest files.
    • New mod management features: add Workshop mods, manage mod configurations, and enabled state.
  • Changed

    • Simplified console output formatting: replaced emoji status indicators with plain text (Error, OK, Warning, Info).
    • Go control room is now the primary interactive interface; legacy shell UI removed.
    • Reorganized project structure and documentation with new addon and mod directories.
  • Documentation

    • Added comprehensive CHANGELOG.md in Keep-a-Changelog format.
    • Updated README with new layout, setup workflow, and addon documentation.
    • Added addon system documentation and contributing guidelines updates.
  • Bug Fixes

    • Improved CPU temperature sensor reading and offline server metric handling.
  • Tests

    • New test coverage for addon manifest loading and mod management features.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 29, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The pull request reorganizes the Go application entrypoint into cmd/tmodloader-ui, adds comprehensive addon manifest loading and mod configuration management to the control room UI, refactors shell scripts to standardize output formatting, and updates documentation to reflect new capabilities and directory structure.

Changes

Cohort / File(s) Summary
Build and Project Configuration
.github/pull_request_template.md, .gitignore, Makefile
Updated PR checklist with Go test requirement and CHANGELOG updates; expanded gitignore for profiler and UI build artifacts; modified Makefile to build from cmd/tmodloader-ui instead of repository root.
Core Documentation
README.md, CHANGELOG.md, CONTRIBUTING.md
Repositioned repo as "server home," restructured with Go control room focus and new addon/ModConfigs directory layout; introduced Keep-a-Changelog structure with [Unreleased] section; updated contribution guidelines with Go test and CHANGELOG requirements.
Addon and User Guide Documentation
Addons/README.md, Addons/example-admin/addon.json.example, Scripts/steam/mod_ids.example.txt
Added addon extension documentation with manifest format and placeholder expansion; provided example addon configuration; updated mod ID file guidance to reference Go control room and CLI commands.
Man Page
man/tmod-control.1
Updated documentation date and content to remove legacy shell UI fallback references; added addon loading documentation and expanded mods command sections (add, ids, clear); replaced environment variable references with Scripts/env.sh guidance.
Shell Script Standardization
Scripts/backup/tmod-backup.sh, Scripts/core/tmod-monitor.sh, Scripts/core/tmod-server.sh, Scripts/diag/tmod-diagnostics.sh, Scripts/steam/tmod-workshop.sh
Added print_divider() helper function across scripts; replaced emoji/icon status markers (, , ⚠️, etc.) with plain text prefixes (OK:, Error:, Warning:, Info:, Tip:); standardized divider and banner output.
Temperature and Sensor Processing
Scripts/core/tmod-core.sh
Refactored CPU temperature collection to accumulate sensor readings and compute median/preferred value; changed control flow for fallback order (sensors-first for CPU, thermal-zones-first for other categories); improved detection of Tdie, Tctl, Package, and per-core temperatures.
Control Room Hub Script
Scripts/hub/tmod-control.sh
Removed entire legacy shell UI implementation (world picker, fzf/dialog menus, command palette); simplified launch_go_tui() to remove legacy-mode gating and source-run changes (go run .go run ./cmd/tmodloader-ui); added print_divider() helper; updated messaging from emoji to plain text prefixes.
Go Application Restructuring
main.go, cmd/tmodloader-ui/main.go
Deleted root main() entrypoint; added new cmd/tmodloader-ui/main.go that calls controlroom.Run(baseDir) after resolving working directory.
Control Room Core Logic
internal/controlroom/app.go, internal/controlroom/backend.go
Renamed package from main to controlroom; added addon manifest loading with JSON parsing and validation; introduced mod config picker, Workshop URL input, and installed mod manager UI modes; expanded action types with addon-related metadata; added Run(baseDir) public entry point; implemented dynamic category generation from available actions; refactored message handling for config/mod operations; added small-window handling and new interactive pickers with mouse/key support.
Control Room Tests
internal/controlroom/app_test.go, internal/controlroom/backend_test.go
Added comprehensive test suite for addon manifest loading, category computation, action generation, command streaming, and output formatting; tests cover malformed manifests, placeholder expansion, working directory validation, and mouse/keyboard interactions in new UI modes.

Sequence Diagram

sequenceDiagram
    participant App as Control Room App
    participant FileSystem as File System
    participant Manifest as Addon Manifest
    participant Parser as JSON Parser
    participant UI as UI Renderer

    App->>FileSystem: Scan Addons/*/addon.json
    FileSystem-->>App: Return manifest paths
    
    loop For each manifest file
        App->>Manifest: Read addon.json
        Manifest-->>App: Raw JSON content
        App->>Parser: Parse JSON into addonManifest
        alt Valid JSON
            Parser-->>App: addonManifest struct
            App->>App: Expand ${repo_dir}, ${addon_dir}<br/>placeholders
            App->>App: Validate actions & workDir
            App->>App: Generate action entries with<br/>category & metadata
        else Invalid/Malformed
            Parser-->>App: Error + warning
            App->>App: Skip manifest, log<br/>warning to control.log
        end
    end
    
    App->>App: Build categories from all<br/>loaded actions
    App->>UI: Render action panel with<br/>addon-provided actions
    UI-->>App: User selects action
    App->>FileSystem: Execute action command<br/>in addon workDir
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Poem

🐰 With addons now loaded from manifests so bright,
And mods picking clean without shell's old light,
Plain text replaces the emoji parade,
While cmd/tmodloader-ui makes the new trade!
Scripts standardized, Go control room refined—
A modular warren of changes, well-designed! 🎭

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 26.40% 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 '[codex] Refresh control room and addon workflows' directly and concisely summarizes the main objectives: restructuring the control room architecture and updating addon workflows.
Description check ✅ Passed The PR description covers all required template sections: Summary with clear explanation of changes and user-facing effects, Validation with all required checks marked complete, and Notes addressing portability, migration, and follow-up work impacts.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/control-room-refresh

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.

@appaKappaK appaKappaK merged commit 23dbf0c into main Mar 29, 2026
1 of 2 checks passed
@appaKappaK appaKappaK deleted the codex/control-room-refresh branch March 29, 2026 10:35
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