Skip to content

[codex] Improve onboarding, portability, and failure visibility#2

Merged
im-sham merged 1 commit into
mainfrom
codex/onboarding-and-usability
Feb 17, 2026
Merged

[codex] Improve onboarding, portability, and failure visibility#2
im-sham merged 1 commit into
mainfrom
codex/onboarding-and-usability

Conversation

@im-sham
Copy link
Copy Markdown
Owner

@im-sham im-sham commented Feb 17, 2026

Summary

This PR improves Nightshift's day-0 usability and portability for users running outside the original local setup, while keeping compatibility with OpenCode workflows.

The biggest user-facing changes are a new guided setup flow (nightshift init), an environment health check (nightshift doctor), portable model selection based on local opencode models, and richer visibility into failed tasks in reports and the dashboard.

Problem

Nightshift worked well on a specific local machine configuration, but onboarding and forking were harder than necessary:

  • setup assumptions were implicit
  • model defaults were static and could mismatch what a user has installed in OpenCode
  • failure context was too hidden when runs partially failed
  • docs and repo scaffolding were missing common contributor ergonomics

This increased friction for new users and fork maintainers and made debugging less direct.

Root Cause

The project relied on hardcoded defaults and mostly static configuration assumptions:

  • fixed model chains without runtime discovery
  • limited first-run guidance in CLI
  • no centralized per-user config file workflow
  • no explicit diagnostics command for common local issues
  • limited documentation and issue/PR templates for contribution workflows

Fix

Config + portability

  • added user config support in ~/.nightshift/config.toml
  • added NIGHTSHIFT_CONFIG_FILE and NIGHTSHIFT_DATA_DIR overrides
  • merged config precedence as: explicit CLI args > config file > built-ins
  • introduced helper accessors for defaults, aliases, and preferred model order

CLI UX

  • added nightshift init to bootstrap config files safely
  • added nightshift doctor to validate environment readiness (opencode, gh, config parse, data dir permissions, plugin deps)
  • made nightshift start accept optional duration/priority and defer to config defaults when omitted

Model resilience

  • implemented model discovery from opencode models
  • automatically builds fallback chains from available models when preferred ones are missing
  • wired discovery-aware model manager into CLI status, runner, and server API

Failure visibility

  • added failed-task retrieval in queue layer
  • included failed-task details in generated report markdown
  • exposed recent failures in /status API and rendered them in dashboard UI

Contributor/fork ergonomics

  • added CONTRIBUTING.md
  • added ARCHITECTURE.md
  • added .env.example
  • added GitHub issue templates and PR template
  • updated README.md for portable paths and new setup/diagnostics flow

Validation

  • .venv/bin/python -m pytest -q (9 passed)
  • .venv/bin/python -m compileall -q src tests
  • cd plugin && bun run typecheck

Impact

These changes reduce setup ambiguity, make forks easier to operate across machines, and speed up troubleshooting when runs fail or model availability differs from defaults.

@im-sham im-sham marked this pull request as ready for review February 17, 2026 19:59
@im-sham im-sham merged commit aef2c2d into main Feb 17, 2026
4 checks passed
@im-sham im-sham deleted the codex/onboarding-and-usability branch February 17, 2026 19:59
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