Skip to content

fix(ui): align host configuration with global editor - #109

Merged
RentnerKev merged 3 commits into
mainfrom
fix/unify-host-config
Sep 15, 2026
Merged

RentnerKev merged 3 commits into
mainfrom
fix/unify-host-config

Conversation

@RentnerKev

@RentnerKev RentnerKev commented Sep 13, 2026

Copy link
Copy Markdown
Owner

The per-host Caddy configuration dialog still exposed Preview, Generated defaults and Reload, and displayed active configuration as plain text. It now matches the global editor with Settings and Active config, using the same formatted, syntax-highlighted CaddyConfigCodeBlock.

Removed obsolete preview/reload state and handlers from the host editor. Host-specific settings, revision-aware saves, toast feedback, the disabled-host notice, and confirmed reset behavior remain intact. The host dialog continues to expose only the four supported host overrides.

Closes #108

Validation: focused proxy-host UI tests pass (38 tests), including new formatting/obsolete-controls and reset-confirmation regressions. The full bun run check passed: formatting, lint, TypeScript, migration checks, 696 web tests (124 environment-dependent tests skipped), Cargo check/Clippy/tests, and web/controller production builds.

Summary by CodeRabbit

  • Changes
    • Streamlined the proxy host configuration editor to focus on editing and viewing the active configuration.
    • Active configurations now use a consistently formatted code display.
    • Removed the Preview, Generated defaults, and Reload actions from the editor.
    • Simplified the restore-defaults confirmation flow, including clearer cancellation and successful application feedback.

@RentnerKev RentnerKev added this to the v1.0.0-beta.1 milestone Sep 13, 2026
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 9049d922-5ea4-4cb9-9134-db765323c6e1

📥 Commits

Reviewing files that changed from the base of the PR and between 1552ce8 and 4c954b6.

📒 Files selected for processing (2)
  • web/src/features/Admin/ProxyHostManagement/Components/ProxyConfigEditorModal.tsx
  • web/src/features/Admin/ProxyHostManagement/Hooks/useProxyConfigEditorLogic.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • web/src/features/Admin/ProxyHostManagement/Components/ProxyConfigEditorModal.tsx
  • web/src/features/Admin/ProxyHostManagement/Hooks/useProxyConfigEditorLogic.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The proxy host configuration editor now exposes only edit and active views. It removes preview, defaults, reload, and related state. The active configuration uses formatted syntax rendering. Tests cover the updated controls and reset flow.

Changes

Host editor alignment

Layer / File(s) Summary
Editor contract and logic
web/src/features/Admin/ProxyHostManagement/Types/proxy-config-editor.types.ts, web/src/features/Admin/ProxyHostManagement/Hooks/useProxyConfigEditorLogic.ts
The editor contracts and hook no longer expose preview, reload, refresh, dirty-state, or reload-confirmation members.
Editor modal controls and rendering
web/src/features/Admin/ProxyHostManagement/Components/ProxyConfigEditorModal.tsx
The modal retains edit and active tabs, renders the active configuration with CaddyConfigCodeBlock, and keeps reset and save actions.
Editor regression coverage
web/src/tests/proxy-hosts-ui.test.tsx
Tests verify formatted active configuration output, removal of obsolete actions, and reset cancellation and confirmation behavior.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 4c954

The editor alignment change has no identified current-head defect requiring resolution before merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: aligning the host configuration UI with the global editor.
Description check ✅ Passed The description clearly explains the UI changes, preserved behavior, linked issue, and validation results. It omits the template headings for Type of change, Checklist, Breaking changes, and Screensho…
Linked Issues check ✅ Passed The changes satisfy issue #108. ProxyConfigEditorModal now uses the shared CaddyConfigCodeBlock, supports only Settings and Active views, and removes Preview, Generated defaults, and Reload contro…
Out of Scope Changes check ✅ Passed The reported changes are limited to the per-host configuration modal, its logic hook and types, and focused proxy-host UI tests. These changes directly implement issue #108 and preserve the host confi…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files.
✨ 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 fix/unify-host-config

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.

@github-actions github-actions Bot added area: proxy Proxy host configuration and request forwarding. area: ui Web interface components, routes, styling, and localization. labels Sep 13, 2026
@github-actions

github-actions Bot commented Sep 13, 2026

Copy link
Copy Markdown

🐳 RentnerProxy PR Preview

A test-only image for this pull request has been published successfully.

Images

Type Image
Moving preview for this PR ghcr.io/rentnerkev/rentnerproxy:pr-109
Exact tested build ghcr.io/rentnerkev/rentnerproxy:pr-109-3942802cc341

Image digest: sha256:e36f226ebf927484b994d4c6847a624d8b635d84fa4acb6fd8e4091308d1a5d4

Tested and built merge commit: 3942802cc341fdbdc39e492ccfd41b30f7a32372

Pull request head commit: 4c954b68d8b81bef5a3cb2273cc14cf57e6d943c

For reproducible testing and bug reports, prefer pr-109-3942802cc341. The pr-109 tag moves to the newest successful preview for this PR.


⚠️ Unreviewed development preview

This image contains unreviewed pull-request code. It may contain bugs, breaking changes, incomplete or incompatible migrations, configuration errors, and changes that damage data or runtime state.

Do not use this PR preview image with production data.

Before testing:

  1. Back up PostgreSQL.
  2. Back up the complete RentnerProxy controller/runtime state in /var/lib/rentnerproxy, including certificates, private keys, ACME state, active configuration, last-known-good state, and trusted CA material.
  3. Prefer a separate test database and separate Docker volumes.
  4. Use an isolated Docker Compose project and avoid production port bindings.

Docker

docker pull ghcr.io/rentnerkev/rentnerproxy:pr-109-3942802cc341

Docker Compose

In a separate test copy of docker-compose.yml, replace the service image with:

image: ghcr.io/rentnerkev/rentnerproxy:pr-109-3942802cc341

Then use an isolated Compose project:

docker compose --project-name rentnerproxy-pr-109 pull
docker compose --project-name rentnerproxy-pr-109 up -d

The repository Compose file binds ports 80, 81, and 443; change those bindings or stop the production stack before testing.

This preview is intended only for testing this pull request and is not a production release.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

🤖 Completed: Fix pre-merge checks in PR #109View commit 4c954b6

@RentnerKev
RentnerKev merged commit 3c89f42 into main Sep 15, 2026
21 checks passed
@RentnerKev
RentnerKev deleted the fix/unify-host-config branch September 15, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: proxy Proxy host configuration and request forwarding. area: ui Web interface components, routes, styling, and localization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ui): unify per-host and global configuration editors

1 participant