Skip to content

feat: Hide server name in onboarding#1993

Open
elibosley wants to merge 1 commit intomainfrom
codex/hide-onboarding-server-name
Open

feat: Hide server name in onboarding#1993
elibosley wants to merge 1 commit intomainfrom
codex/hide-onboarding-server-name

Conversation

@elibosley
Copy link
Copy Markdown
Member

@elibosley elibosley commented Apr 20, 2026

Summary

  • Visually hide the onboarding server-name field and local hostname badge while keeping state and apply logic intact
  • Visually hide server-name display in the onboarding summary and next-steps specs
  • Add focused tests that assert the server-name UI remains hidden

Tests

  • NODE_OPTIONS=--no-experimental-webstorage pnpm exec vitest run test/components/Onboarding/OnboardingCoreSettingsStep.test.ts test/components/Onboarding/OnboardingSummaryStep.test.ts test/components/Onboarding/OnboardingNextStepsStep.test.ts
  • pnpm exec prettier --check src/components/Onboarding/steps/OnboardingCoreSettingsStep.vue src/components/Onboarding/steps/OnboardingNextStepsStep.vue src/components/Onboarding/steps/OnboardingSummaryStep.vue test/components/Onboarding/OnboardingCoreSettingsStep.test.ts test/components/Onboarding/OnboardingSummaryStep.test.ts

Summary by CodeRabbit

  • Tests

    • Added test coverage verifying server name controls are hidden in core settings and summary onboarding steps.
  • Changes

    • Server name field is now hidden across onboarding core settings, summary, and next steps screens.
    • Server name input removed from keyboard navigation in core settings step.

- Purpose: hide the server name from the onboarding flow without changing the underlying state or apply behavior.

- Before: onboarding showed the server name in core settings, next steps, and the summary card.

- Problem: the flow exposed server identity details that should no longer be visible to users during onboarding.

- Now: server-name UI nodes remain mounted for state continuity but are visually hidden and removed from accessibility exposure.

- How: adds Tailwind hidden styling, aria-hidden markers, and focused tests that assert the server-name rows stay hidden.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

Walkthrough

The pull request hides the server name element across multiple onboarding step components by applying hidden CSS classes and aria-hidden attributes, with corresponding test additions to verify the hidden state.

Changes

Cohort / File(s) Summary
Test Coverage for Hidden Server Name
web/__test__/components/Onboarding/OnboardingCoreSettingsStep.test.ts, web/__test__/components/Onboarding/OnboardingSummaryStep.test.ts
Added test cases asserting that server name elements are hidden via CSS class presence on parent elements.
Server Name Visibility Changes
web/src/components/Onboarding/steps/OnboardingCoreSettingsStep.vue, web/src/components/Onboarding/steps/OnboardingNextStepsStep.vue, web/src/components/Onboarding/steps/OnboardingSummaryStep.vue
Applied hidden CSS class and aria-hidden="true" attributes to server name elements and containers; added tabindex="-1" to one input to remove from tab order.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 The server name now hides away,
Wrapped in hidden, out of play,
Aria marks it from sight,
Tests confirm it—hidden right!
No tab-focus, no display.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately summarizes the main change: hiding server name fields across multiple onboarding components while preserving state and logic.

✏️ 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/hide-onboarding-server-name

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
web/src/components/Onboarding/steps/OnboardingCoreSettingsStep.vue (1)

459-473: ⚠️ Potential issue | 🟠 Major

Hidden server-name control can create an unrecoverable submit block.

Because Line 459 hides the entire server-name control, but submit still fails when serverNameValidation is non-null (Line 359, Line 624), users with an invalid preloaded server name cannot proceed or fix it.

Proposed fix (gate server-name validation only when the control is visible)
+const isServerNameUiHidden = true;
+
 const handleSubmit = async () => {
-  if (serverNameValidation.value || serverDescriptionValidation.value) {
+  if ((!isServerNameUiHidden && serverNameValidation.value) || serverDescriptionValidation.value) {
     error.value = t('common.error');
     return;
   }
         <BrandButton
           :text="t('onboarding.coreSettings.next')"
           class="!bg-primary hover:!bg-primary/90 w-full min-w-[160px] !text-white shadow-md transition-all hover:shadow-lg sm:w-auto"
-          :disabled="isBusy || !!serverNameValidation || !!serverDescriptionValidation"
+          :disabled="
+            isBusy || (!isServerNameUiHidden && !!serverNameValidation) || !!serverDescriptionValidation
+          "
           :loading="isBusy"
           `@click`="handleSubmit"
           :icon-right="ChevronRightIcon"
         />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@web/src/components/Onboarding/steps/OnboardingCoreSettingsStep.vue` around
lines 459 - 473, The server-name input (UInput bound to serverName) is rendered
hidden (class "hidden", aria-hidden="true") but serverNameValidation is still
blocking submission; update the validation gating so serverNameValidation only
affects form submission and input styling when the control is visible. Add a
visibility check (e.g., isServerNameVisible or derive from the same condition
that adds "hidden"/aria-hidden) and use it wherever serverNameValidation is
consulted (submit handler and any computed/disabled logic) so invalid preloaded
server names do not block progress when the field is hidden; keep the existing
model (serverName, serverNameValidation, isBusy) and only apply the red-border
class and validation failure when the visibility flag is true.
🧹 Nitpick comments (2)
web/__test__/components/Onboarding/OnboardingSummaryStep.test.ts (1)

482-487: Make the hidden-state assertion less brittle and async-safe.

Await pending renders, assert the element exists first, then verify both hidden and aria-hidden.

Suggested test update
-  it('marks the server name hidden in the summary card', () => {
+  it('marks the server name hidden in the summary card', async () => {
     const { wrapper } = mountComponent();
+    await flushPromises();

     const serverNameLabel = wrapper.findAll('span').find((span) => span.text() === 'Server Name');
-    expect(serverNameLabel?.element.parentElement?.classList.contains('hidden')).toBe(true);
+    expect(serverNameLabel).toBeDefined();
+    const row = serverNameLabel!.element.parentElement as HTMLElement;
+    expect(row.classList.contains('hidden')).toBe(true);
+    expect(row.getAttribute('aria-hidden')).toBe('true');
   });

Based on learnings: Applies to web/**/*.test.{ts,tsx} : Vue component testing: Always await async operations before making assertions.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@web/__test__/components/Onboarding/OnboardingSummaryStep.test.ts` around
lines 482 - 487, The test 'marks the server name hidden in the summary card' is
brittle and not awaiting Vue's async updates; make the test async, await pending
renders (e.g., await wrapper.vm.$nextTick() or await flushPromises()) after
calling mountComponent(), locate the Server Name element via wrapper.find /
wrapper.findAll and assert it exists first, then verify its parent element has
the 'hidden' class and that the element (or its parent) has aria-hidden="true";
use the existing mountComponent, wrapper, and serverNameLabel identifiers to
find and assert on the DOM nodes.
web/__test__/components/Onboarding/OnboardingCoreSettingsStep.test.ts (1)

202-208: Strengthen this test to validate behavior/accessibility, not only a CSS utility class.

Assert that the row exists and carries aria-hidden="true" in addition to the hidden class.

Suggested test update
   it('marks server name controls hidden', async () => {
     const { wrapper } = mountComponent();
     await flushPromises();

     const serverNameLabel = wrapper.findAll('label').find((label) => label.text() === 'Server Name');
-    expect(serverNameLabel?.element.parentElement?.classList.contains('hidden')).toBe(true);
+    expect(serverNameLabel).toBeDefined();
+    const row = serverNameLabel!.element.parentElement as HTMLElement;
+    expect(row.classList.contains('hidden')).toBe(true);
+    expect(row.getAttribute('aria-hidden')).toBe('true');
   });

Based on learnings: Applies to /test/components//*.ts : Test component behavior and output, not implementation details.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@web/__test__/components/Onboarding/OnboardingCoreSettingsStep.test.ts` around
lines 202 - 208, The test currently only checks for the presence of the 'hidden'
CSS class on the Server Name label (serverNameLabel variable); update it to
assert the row exists and that the DOM indicates it is hidden for accessibility
by also checking the container/row element has aria-hidden="true" (in addition
to the hidden class). Locate where serverNameLabel is found via
wrapper.findAll('label') and then inspect its parent/container element
(parentElement or closest row) to assert it is present and that
parentElement.getAttribute('aria-hidden') === 'true' while still confirming the
'hidden' class.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@web/src/components/Onboarding/steps/OnboardingCoreSettingsStep.vue`:
- Around line 459-473: The server-name input (UInput bound to serverName) is
rendered hidden (class "hidden", aria-hidden="true") but serverNameValidation is
still blocking submission; update the validation gating so serverNameValidation
only affects form submission and input styling when the control is visible. Add
a visibility check (e.g., isServerNameVisible or derive from the same condition
that adds "hidden"/aria-hidden) and use it wherever serverNameValidation is
consulted (submit handler and any computed/disabled logic) so invalid preloaded
server names do not block progress when the field is hidden; keep the existing
model (serverName, serverNameValidation, isBusy) and only apply the red-border
class and validation failure when the visibility flag is true.

---

Nitpick comments:
In `@web/__test__/components/Onboarding/OnboardingCoreSettingsStep.test.ts`:
- Around line 202-208: The test currently only checks for the presence of the
'hidden' CSS class on the Server Name label (serverNameLabel variable); update
it to assert the row exists and that the DOM indicates it is hidden for
accessibility by also checking the container/row element has aria-hidden="true"
(in addition to the hidden class). Locate where serverNameLabel is found via
wrapper.findAll('label') and then inspect its parent/container element
(parentElement or closest row) to assert it is present and that
parentElement.getAttribute('aria-hidden') === 'true' while still confirming the
'hidden' class.

In `@web/__test__/components/Onboarding/OnboardingSummaryStep.test.ts`:
- Around line 482-487: The test 'marks the server name hidden in the summary
card' is brittle and not awaiting Vue's async updates; make the test async,
await pending renders (e.g., await wrapper.vm.$nextTick() or await
flushPromises()) after calling mountComponent(), locate the Server Name element
via wrapper.find / wrapper.findAll and assert it exists first, then verify its
parent element has the 'hidden' class and that the element (or its parent) has
aria-hidden="true"; use the existing mountComponent, wrapper, and
serverNameLabel identifiers to find and assert on the DOM nodes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a6f2d1ec-6550-4254-b738-aa4765d4f0eb

📥 Commits

Reviewing files that changed from the base of the PR and between ad4834a and 162b73d.

📒 Files selected for processing (5)
  • web/__test__/components/Onboarding/OnboardingCoreSettingsStep.test.ts
  • web/__test__/components/Onboarding/OnboardingSummaryStep.test.ts
  • web/src/components/Onboarding/steps/OnboardingCoreSettingsStep.vue
  • web/src/components/Onboarding/steps/OnboardingNextStepsStep.vue
  • web/src/components/Onboarding/steps/OnboardingSummaryStep.vue

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.55%. Comparing base (ad4834a) to head (162b73d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1993   +/-   ##
=======================================
  Coverage   52.55%   52.55%           
=======================================
  Files        1033     1033           
  Lines       71649    71654    +5     
  Branches     8172     8172           
=======================================
+ Hits        37655    37660    +5     
  Misses      33869    33869           
  Partials      125      125           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

This plugin has been deployed to Cloudflare R2 and is available for testing.
Download it at this URL:

https://preview.dl.unraid.net/unraid-api/tag/PR1993/dynamix.unraid.net.plg

@elibosley elibosley marked this pull request as ready for review April 23, 2026 16:00
@elibosley elibosley changed the title Hide server name in onboarding feat: Hide server name in onboarding Apr 23, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 162b73dd4f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<div class="mb-8 grid grid-cols-1 gap-x-6 gap-y-8 md:grid-cols-2">
<!-- Server Name -->
<div class="flex flex-col gap-2">
<div class="hidden flex-col gap-2" aria-hidden="true">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep server-name editable while submit validation is active

Hiding this entire server-name control makes onboarding impossible to complete whenever serverName is empty or invalid (for example, a bad value from draft/API/activation metadata), because submit is still blocked by serverNameValidation in both handleSubmit and the Next button disable condition. Before this change users could correct the value; after this change they can get stuck on this step with no visible way to fix it.

Useful? React with 👍 / 👎.

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