Skip to content

fix(array-operation): start encrypted array on Enter in passphrase field (OS-462)#2670

Open
elibosley wants to merge 1 commit into
masterfrom
fix/array-start-passphrase-enter-key
Open

fix(array-operation): start encrypted array on Enter in passphrase field (OS-462)#2670
elibosley wants to merge 1 commit into
masterfrom
fix/array-start-passphrase-enter-key

Conversation

@elibosley

@elibosley elibosley commented Jun 19, 2026

Copy link
Copy Markdown
Member

Summary

On the Array Operation page, when starting an encrypted array you must type the passphrase and then click the Start button — pressing Enter in the passphrase field does nothing. This adds Enter-to-start so the passphrase field behaves like a normal login form.

Changes

  • Added a small submitOnEnter(event) helper in ArrayOperation.page that, on Enter, clicks #cmdStart only when it is enabled.
  • Wired onkeydown='submitOnEnter(event)' onto the Passphrase and Retype passphrase inputs.

Because it just clicks the existing Start button, it inherits all current validation: the button stays disabled until the passphrase is non-empty (and matches the retype field when shown), so Enter can't bypass any checks or fire while the array isn't ready to start. The keyfile flow is unaffected.

Test plan

  • Stopped, encrypted array → focus the Passphrase field, type a valid passphrase, press Enter → array starts (same as clicking Start).
  • Empty passphrase + Enter → nothing happens (button still disabled).
  • New-key / reformat case with Retype passphrase → Enter only starts once both fields match.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added Enter-key support in the encryption passphrase and retype passphrase fields, so pressing Enter behaves like clicking the start button.
    • When the retype field is visible, Enter advances focus to the correct retype input; otherwise it initiates the operation automatically.

Linear

  • OS-462

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

A new submitOnEnter(event) JavaScript function is added to ArrayOperation.page. It intercepts Enter keypresses, prevents default form submission, and either triggers a click on the cmdStart button if it exists and is not disabled, or advances focus to the retype-passphrase field when in the set-new-passphrase state. The passphrase and retype-passphrase input fields are updated to call this function via onkeydown.

Changes

Enter-key submit for encryption passphrase inputs

Layer / File(s) Summary
submitOnEnter helper and input wiring
emhttp/plugins/dynamix/ArrayOperation.page
New submitOnEnter(event) function prevents default Enter behavior, clicks cmdStart when present and enabled, or advances focus to retype field when in set-new-passphrase state; passphrase and retype-passphrase inputs gain onkeydown="submitOnEnter(event)".

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 Tap tap tap goes the key,
No more clicking, fingers free!
Enter pressed on passphrase true,
The array starts—hop right through!
A rabbit's shortcut, neat and new~ 🗝️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the change: enabling Enter to start an encrypted array from the passphrase field.
✨ 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/array-start-passphrase-enter-key

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

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

🔧 PR Test Plugin Available

A test plugin has been generated for this PR that includes the modified files.

Version: 2026.06.19.1437
Build: View Workflow Run

📥 Installation Instructions:

Install via Unraid Web UI:

  1. Go to Plugins → Install Plugin
  2. Copy and paste this URL:
https://preview.dl.unraid.net/pr-plugins/pr-2670/webgui-pr-2670.plg
  1. Click Install

Alternative: Direct Download

⚠️ Important Notes:

  • Testing only: This plugin is for testing PR changes
  • Backup included: Original files are automatically backed up
  • Easy removal: Files are restored when plugin is removed
  • Conflicts: Remove this plugin before installing production updates
  • Post-merge behavior: This preview stays available after merge until preview storage expires or it is manually cleaned up

📝 Modified Files:

Click to expand file list
emhttp/plugins/dynamix/ArrayOperation.page

🔄 To Remove:

Navigate to Plugins → Installed Plugins and remove webgui-pr-2670, or run:

plugin remove webgui-pr-2670

🤖 This comment is automatically generated and will be updated with each new push to this PR.

@elibosley
elibosley force-pushed the fix/array-start-passphrase-enter-key branch 3 times, most recently from 5cef36b to fa9f0a8 Compare June 19, 2026 02:44
Pressing Enter in the encryption passphrase (or retype passphrase) field
now triggers the Start button, instead of requiring a mouse click. The
handler only fires when the Start button is enabled, so it respects the
same passphrase validation as clicking (non-empty, matching retype, etc.).

In the set-new-passphrase flow (retype field shown), Enter in the
passphrase field advances focus to the retype field to confirm, rather
than doing nothing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@elibosley
elibosley force-pushed the fix/array-start-passphrase-enter-key branch from fa9f0a8 to b6f44fd Compare June 19, 2026 14:37
@elibosley elibosley changed the title fix(array-operation): start encrypted array on Enter in passphrase field fix(array-operation): start encrypted array on Enter in passphrase field (OS-462) Jul 8, 2026
@unraid-bot unraid-bot added the 7.4.0 Approved for release 7.4.0 (auto-managed by notification-worker) label Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

7.4.0 Approved for release 7.4.0 (auto-managed by notification-worker)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants