Skip to content

Skjul ikke-delegerbare pakker fra pakkelister #3190 - #2223

Merged
sonwit merged 3 commits into
mainfrom
chore/hide-non-assignable-packages
May 21, 2026
Merged

Skjul ikke-delegerbare pakker fra pakkelister #3190#2223
sonwit merged 3 commits into
mainfrom
chore/hide-non-assignable-packages

Conversation

@sonwit

@sonwit sonwit commented May 20, 2026

Copy link
Copy Markdown
Contributor

Skjuler pakker som har isAssignable === false i useAreaPackageList. Pakker som ingen har, og som uansett ikke kan delegeres via vanlig GUI, skjules nå fra både delegeringsflyten og fullmaktsoversikten.

Selve kodeendringen som fikser det ble dessverre med på en feiltagelse i forrige PR. Jeg hadde endringen liggende i working tree mens jeg jobbet med Maskinporten-PR-en, og fikk den ikke skilt ut i egen branch før commit. Men jeg legger på noen kommentarer for å synliggjøre endringen her.

Beklager det. Mea culpa. Jeg legger meg paddeflat 🐸

Description

Related Issue(s)

Altinn/altinn-authorization-tmp#3190

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

Summary by CodeRabbit

  • Documentation
    • Added internal clarification comments to package-filtering logic to explain omission of non-assignable packages and skipping empty areas.

Note: This release contains internal code improvements with no user-facing changes.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@sonwit has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 53 minutes and 47 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0e8ee46b-a8ab-4216-bdb8-9dd56a8c5527

📥 Commits

Reviewing files that changed from the base of the PR and between fb46e80 and c42a6d0.

📒 Files selected for processing (1)
  • src/features/amUI/common/AccessPackageList/useAreaPackageList.ts
📝 Walkthrough

Walkthrough

Two clarifying comments are added to the useAreaPackageList hook to document when non-assignable packages and areas are filtered during the access package reduction logic.

Changes

Filtering Logic Clarity

Layer / File(s) Summary
Filtering clarity comments
src/features/amUI/common/AccessPackageList/useAreaPackageList.ts
Inline comments added at lines 136 and 153 to clarify that non-assignable packages are omitted from the available list and that an area is skipped when none of its packages are delegatable.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

📝 ✨ A comment here, a note there,
Clarity shines in the filtering air,
When packages hide and areas fade,
The logic's intent is now clearly displayed! 🎯

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: hiding non-assignable packages from package lists, directly matching the PR's core objective and commit focus.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/hide-non-assignable-packages

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.

@sonwit
sonwit marked this pull request as ready for review May 20, 2026 07:47
Copilot AI review requested due to automatic review settings May 20, 2026 07:47

Copilot AI 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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Clarifies in-code reasoning for hiding non-delegable access packages/areas in useAreaPackageList by adding explanatory comments at the relevant filter points.

Changes:

  • Added comment explaining why non-assignable packages are excluded from the “available” list when showing all packages
  • Added comment explaining why areas may be hidden when they only contain non-assignable packages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/features/amUI/common/AccessPackageList/useAreaPackageList.ts Outdated
Comment thread src/features/amUI/common/AccessPackageList/useAreaPackageList.ts Outdated
@github-actions github-actions Bot added the kind/chore Create a none user-story issue (chore, tech issue, backend issue) label May 20, 2026
@sonwit
sonwit requested a review from allinox May 20, 2026 13:18
Comment thread src/features/amUI/common/AccessPackageList/useAreaPackageList.ts
@sonwit
sonwit merged commit d0f32d9 into main May 21, 2026
5 checks passed
@sonwit
sonwit deleted the chore/hide-non-assignable-packages branch May 21, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/chore Create a none user-story issue (chore, tech issue, backend issue)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants