Skip to content

Show inline error for wrong album password instead of opening login - #4665

Open
matthewbolding wants to merge 2 commits into
LycheeOrg:masterfrom
matthewbolding:album-unlock-wrong-password-inline-error
Open

Show inline error for wrong album password instead of opening login#4665
matthewbolding wants to merge 2 commits into
LycheeOrg:masterfrom
matthewbolding:album-unlock-wrong-password-inline-error

Conversation

@matthewbolding

@matthewbolding matthewbolding commented Aug 25, 2026

Copy link
Copy Markdown

Summary

When an album is password-protected and the wrong password is entered, the unlock dialog currently closes and the site-wide login form opens instead, with no indication the password itself was wrong.

This makes the unlock dialog stay open and show an inline error on a 403 response, so the user can just retry the password. Other failure types keep the existing fallback behavior. Applied to both the v7 and v8 Unlock dialogs, following the same pattern already used in LoginForm.vue.

Test plan

  • npm run format — no changes
  • npm run check (vue-tsc) — passes
  • npm run build — succeeds
  • Manually verified against a running v7.7.5 instance: entering a wrong album password now shows the inline error and keeps the dialog open; correct password still unlocks normally

Summary by CodeRabbit

  • Bug Fixes

    • Incorrect passwords entered when unlocking a protected album now display a clear inline error message.
    • The unlock dialog remains open so the password can be corrected and resubmitted.
    • The error clears automatically when the password is edited.
    • Other unlock failures continue to follow the existing error-handling behavior.
  • Localization

    • Added incorrect-password messages across supported languages.

@matthewbolding
matthewbolding requested a review from a team as a code owner August 25, 2026 02:16
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8ce8631b-fd06-4629-91e7-d38acb51a345

📥 Commits

Reviewing files that changed from the base of the PR and between c017eec and 22b5d3f.

📒 Files selected for processing (22)
  • lang/ar/dialogs.php
  • lang/bg/dialogs.php
  • lang/cz/dialogs.php
  • lang/de/dialogs.php
  • lang/el/dialogs.php
  • lang/es/dialogs.php
  • lang/fa/dialogs.php
  • lang/fr/dialogs.php
  • lang/hu/dialogs.php
  • lang/it/dialogs.php
  • lang/ja/dialogs.php
  • lang/nl/dialogs.php
  • lang/no/dialogs.php
  • lang/pl/dialogs.php
  • lang/pt/dialogs.php
  • lang/ru/dialogs.php
  • lang/sk/dialogs.php
  • lang/sv/dialogs.php
  • lang/tr/dialogs.php
  • lang/vi/dialogs.php
  • lang/zh_CN/dialogs.php
  • lang/zh_TW/dialogs.php

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The album unlock dialogs in v7 and v8 now show an inline invalid-password message for 403 responses. The message clears when the password changes or the unlock succeeds. Other errors retain the existing failure behavior.

Changes

Album unlock feedback

Layer / File(s) Summary
v7 unlock feedback
lang/*/dialogs.php, resources/js/v7/components/forms/album/Unlock.vue
The dialog translations and v7 unlock dialog now support inline invalid-password feedback. A 403 response keeps the dialog open, while other errors emit fail.
v8 unlock feedback
resources/js/v8/components/forms/album/Unlock.vue
The v8 dialog shows an alert for invalid-password responses and clears the alert when the password changes or the unlock succeeds.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🔵 Low · up to 22b5d

The PR keeps album-unlock dialogs open and shows an inline error for wrong passwords, while other failures retain existing behavior. It is mergeable with owner awareness of the unresolved component-guideline violation in the v8 dialog.

Poem

A rabbit taps the password gate,
Finds a wrong key, but does not wait.
An alert appears, clear and bright,
New letters make the warning take flight.
The album opens when keys align.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 23 files.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a94058d0-70d2-4ff6-b4c7-5e8bb8284240

📥 Commits

Reviewing files that changed from the base of the PR and between 2ad5e2d and c017eec.

📒 Files selected for processing (3)
  • lang/en/dialogs.php
  • resources/js/v7/components/forms/album/Unlock.vue
  • resources/js/v8/components/forms/album/Unlock.vue

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Comment thread resources/js/v8/components/forms/album/Unlock.vue
Comment thread resources/js/v8/components/forms/album/Unlock.vue
Comment thread lang/en/dialogs.php

@ildyria ildyria left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, just need to fix the translations keys :)

@matthewbolding

Copy link
Copy Markdown
Author

LGTM, just need to fix the translations keys :)

Remaining langs updated to have the invalid_password field. @ildyria

@matthewbolding
matthewbolding requested a review from ildyria August 26, 2026 01:25
@matthewbolding

Copy link
Copy Markdown
Author

Disregard request to re-review; misclick. @ildyria

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.

2 participants