Conversation
📝 WalkthroughWalkthroughThe changes fix overly strict FQDN validation that incorrectly rejected IP addresses when the panel is served over HTTPS. The validation logic is replaced with state-dependent checks that consider both the FQDN input and resolved IP address. UI feedback is improved with clearer SSL and DNS-related hints. Form structure is reorganized to remove the explicit Changes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/Filament/Admin/Resources/Nodes/Pages/EditNode.php (1)
134-286: Extract the shared node-connection schema.This block now matches
CreateNode::getDefaultSteps()almost line-for-line. The DNS hints, validation, and port defaults will drift the next time one side changes. Pulling the common field definitions into a shared builder/trait would keep create/edit behavior aligned.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/Filament/Admin/Resources/Nodes/Pages/EditNode.php` around lines 134 - 286, The EditNode page duplicates the node-connection form block from CreateNode::getDefaultSteps(), causing drift; extract the shared field definitions (e.g., the TextInput::make('fqdn') block, Hidden::make('ip'), TextInput::make('daemon_connect'), TextInput::make('daemon_listen'), TextInput::make('name'), ToggleButtons::make('connection'), Hidden::make('scheme'), Hidden::make('behind_proxy')) into a single reusable builder or trait (e.g., NodeConnectionFields::getFields() or a NodeFormTrait::connectionFields()) and have both EditNode and CreateNode call that method to return the Field/Component array; ensure the extracted method preserves the live/debounce/rules/prohibited/hint/afterStateUpdated logic and default values so behavior remains identical.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@app/Filament/Admin/Resources/Nodes/Pages/CreateNode.php`:
- Around line 81-96: The prohibited() rule on the hostname field currently
blocks saves when the hidden ip state is empty, which rejects valid hostnames if
DNS hasn't resolved yet; change this by removing or disabling the prohibited()
save-block and instead surface DNS resolution failures only as a non-blocking
warning in the UI. Concretely, remove the anonymous prohibited(...) validator
tied to trans('admin/node.dns_error') on the hostname field (the mirror exists
in EditNode.php), and keep the afterStateUpdated() flow that calls
get_ip_from_hostname() to populate the ip state but do not make ip required for
persistence; if desired, show trans('admin/node.dns_error') via a
validationMessage or helper text/error banner rather than a prohibition so users
are informed but can still save.
---
Nitpick comments:
In `@app/Filament/Admin/Resources/Nodes/Pages/EditNode.php`:
- Around line 134-286: The EditNode page duplicates the node-connection form
block from CreateNode::getDefaultSteps(), causing drift; extract the shared
field definitions (e.g., the TextInput::make('fqdn') block, Hidden::make('ip'),
TextInput::make('daemon_connect'), TextInput::make('daemon_listen'),
TextInput::make('name'), ToggleButtons::make('connection'),
Hidden::make('scheme'), Hidden::make('behind_proxy')) into a single reusable
builder or trait (e.g., NodeConnectionFields::getFields() or a
NodeFormTrait::connectionFields()) and have both EditNode and CreateNode call
that method to return the Field/Component array; ensure the extracted method
preserves the live/debounce/rules/prohibited/hint/afterStateUpdated logic and
default values so behavior remains identical.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 104032c2-253f-447b-9734-2de1782cc825
📒 Files selected for processing (3)
app/Filament/Admin/Resources/Nodes/Pages/CreateNode.phpapp/Filament/Admin/Resources/Nodes/Pages/EditNode.phplang/en/admin/node.php
Closes #2285
Domain name:

IP address:
