Skip to content

Conversation

@HauklandJ
Copy link
Contributor

@HauklandJ HauklandJ commented Jan 27, 2026

Description

Update the error messages to be more informative.
Hard code as fetching from souce is over-engineering as these are not dynamic values.

Docs is a screenshot of the component, which is why the doc issue is connected here.

Related Issue(s)

Verification/QA

  • Manual functionality testing
    • I have tested these changes manually
    • Creator of the original issue (or service owner) has been contacted for manual testing (or will be contacted when released in alpha)
    • No testing done/necessary
  • Automated tests
    • Unit test(s) have been added/updated
    • Cypress E2E test(s) have been added/updated
    • No automatic tests are needed here (no functional changes/additions)
    • I want someone to help me make some tests
  • UU/WCAG (follow these guidelines until we have our own)
    • I have tested with a screen reader/keyboard navigation/automated wcag validator
    • No testing done/necessary (no DOM/visual changes)
    • I want someone to help me perform accessibility testing
  • User documentation @ altinn-studio-docs
    • Has been added/updated
    • No functionality has been changed/added, so no documentation is needed
    • I will do that later/have created an issue
  • Support in Altinn Studio
    • Issue(s) created for support in Studio
    • This change/feature does not require any changes to Altinn Studio
  • Sprint board
    • The original issue (or this PR itself) has been added to the Team Apps project and to the current sprint board
    • I don't have permissions to do that, please help me out
  • Labels
    • I have added a kind/* and backport* label to this PR for proper release notes grouping
    • I don't have permissions to add labels, please help me out

Summary by CodeRabbit

  • Updates

    • Revised person-lookup validation messages in supported languages: failed-attempt threshold lowered from 5 to 3 and wording changed to indicate the search may be temporarily locked.
    • Clarified lockout message to state a 1-hour temporary block.
  • Tests

    • Updated end-to-end expectation to reflect the new 3-attempt threshold.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

PersonLookup validation messages in English, Norwegian Bokmål, and Norwegian Nynorsk were updated to state a 3-attempt retry limit and to explicitly mention a one-hour temporary lockout. A test expectation was adjusted to match the updated message.

Changes

Cohort / File(s) Summary
Language translations
src/language/texts/en.ts, src/language/texts/nb.ts, src/language/texts/nn.ts
Updated person_lookup.validation_error_not_found to reference 3 failed attempts (was 5). Updated person_lookup.validation_error_too_many_requests to explicitly state a 1-hour lockout instead of a generic retry message.
Test expectation
test/e2e/integration/component-library/personlookup.ts
Updated test assertion to expect the revised message indicating temporary block after 3 failed attempts and the one-hour lockout wording.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: informing users about the lock-out duration in PersonLookup error messages.
Description check ✅ Passed The description covers the purpose (informative messages, hard-coded values), links the related issue, and follows the template structure with verification/QA checklists.
Linked Issues check ✅ Passed The PR partially addresses #2643 by aligning documentation and code (both now reference 3 retries), but uses hard-coded values instead of the preferred approach of fetching from the source of truth.
Out of Scope Changes check ✅ Passed All changes are in-scope: translation files and test updates reflect the updated lock-out threshold (3 instead of 5 attempts) and duration messaging aligned with issue #2643.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/limit-on-person-search

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 and usage tips.

@HauklandJ
Copy link
Contributor Author

/publish

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

PR release:

  • <link rel="stylesheet" type="text/css" href="https://altinncdn.no/toolkits/altinn-app-frontend/4.25.0-pr.3722.limit-on-person-search.f8995278/altinn-app-frontend.css">
  • <script src="https://altinncdn.no/toolkits/altinn-app-frontend/4.25.0-pr.3722.limit-on-person-search.f8995278/altinn-app-frontend.js"></script>

⚙️ Building...
✅ Done!

@HauklandJ HauklandJ added backport-ignore This PR is a new feature and should not be cherry-picked onto release branches kind/feature-request New feature or request labels Jan 27, 2026
@HauklandJ HauklandJ linked an issue Jan 27, 2026 that may be closed by this pull request
@HauklandJ
Copy link
Contributor Author

/publish

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

PR release:

  • <link rel="stylesheet" type="text/css" href="https://altinncdn.no/toolkits/altinn-app-frontend/4.25.0-pr.3728.limit-on-person-search.bb0246f3/altinn-app-frontend.css">
  • <script src="https://altinncdn.no/toolkits/altinn-app-frontend/4.25.0-pr.3728.limit-on-person-search.bb0246f3/altinn-app-frontend.js"></script>

⚙️ Building...
✅ Done!

@HauklandJ HauklandJ added kind/product-feature Pull requests containing new features and removed kind/feature-request New feature or request labels Jan 27, 2026
@HauklandJ HauklandJ changed the title update text PersonLookup: Inform user about lock-out duration Jan 27, 2026
@HauklandJ HauklandJ marked this pull request as ready for review January 27, 2026 11:06
Copy link
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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/language/texts/nn.ts`:
- Around line 346-347: Update the Nynorsk translation for the
'person_lookup.validation_error_too_many_requests' key so the message uses
consistent Nynorsk forms: change "fra" to "frå" and "i en time" to "i ein time",
ensuring the full string reads in Nynorsk (e.g., replace "Du har blitt utestengt
fra søkefunksjonaliteten i en time. Ver venleg, prøv igjen seinare." with the
Nynorsk equivalent using "frå" and "ein").

@HauklandJ HauklandJ added the squad/data Issues that belongs to the named squad. label Jan 27, 2026
@HauklandJ HauklandJ moved this to 🔎 In review in Team Altinn Studio Jan 27, 2026
HauklandJ and others added 2 commits January 27, 2026 12:15
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@sonarqubecloud
Copy link

@HauklandJ
Copy link
Contributor Author

/publish

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

PR release:

  • <link rel="stylesheet" type="text/css" href="https://altinncdn.no/toolkits/altinn-app-frontend/4.25.0-pr.3740.limit-on-person-search.e057781e/altinn-app-frontend.css">
  • <script src="https://altinncdn.no/toolkits/altinn-app-frontend/4.25.0-pr.3740.limit-on-person-search.e057781e/altinn-app-frontend.js"></script>

⚙️ Building...
✅ Done!

Copy link
Contributor

@walldenfilippa walldenfilippa left a comment

Choose a reason for hiding this comment

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

Looks good!

@HauklandJ HauklandJ merged commit 3274598 into main Jan 27, 2026
16 checks passed
@HauklandJ HauklandJ deleted the fix/limit-on-person-search branch January 27, 2026 12:55
@github-project-automation github-project-automation bot moved this from 🔎 In review to ✅ Done in Team Altinn Studio Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-ignore This PR is a new feature and should not be cherry-picked onto release branches kind/product-feature Pull requests containing new features squad/data Issues that belongs to the named squad.

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

PersonLookup PersonLookup: Inform user about lock-out duration

2 participants