Skip to content

Fix JWT breadcrumbs#3689

Merged
lunkwill42 merged 5 commits intomasterfrom
fix-jwt-breadcrumbs
Feb 12, 2026
Merged

Fix JWT breadcrumbs#3689
lunkwill42 merged 5 commits intomasterfrom
fix-jwt-breadcrumbs

Conversation

@stveit
Copy link
Copy Markdown
Contributor

@stveit stveit commented Dec 12, 2025

Scope and purpose

Fixes #3682

This makes some big changes to the JWT Create and Edit views: They are changed from being generic.View to generic.CreateView and generic.EditView respectively. This gives us a lot of built in stuff, including breadcrumbs via the get_context_data function (we do this manually for calling render in the create view, but the context is automatically added for the edit view)

The views are a bit cleaner now too, since a lot of things are done for free with the more specific views.

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to NAV can be found in the
Hacker's guide to NAV.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with ruff, easiest by using pre-commit
  • Wrote the commit message so that the first line continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • Based this pull request on the correct upstream branch: For a patch/bugfix affecting the latest stable version, it should be based on that version's branch (<major>.<minor>.x). For a new feature or other additions, it should be based on master.
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • If it's not obvious from a linked issue, described how to interact with NAV in order for a reviewer to observe the effects of this change first-hand (commands, URLs, UI interactions)
  • If this results in changes in the UI: Added screenshots of the before and after
  • If this adds a new Python source code file: Added the boilerplate header to that file

This makes breadcrumbs show up again when editing
JWT tokens
@stveit stveit force-pushed the fix-jwt-breadcrumbs branch from 6b9076f to e8e7f65 Compare December 12, 2025 15:18
@stveit stveit force-pushed the fix-jwt-breadcrumbs branch from e8e7f65 to 2c7960c Compare December 12, 2025 15:21
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 12, 2025

Test results

    27 files      27 suites   46m 1s ⏱️
 2 758 tests  2 758 ✅ 0 💤 0 ❌
20 454 runs  20 454 ✅ 0 💤 0 ❌

Results for commit ba5efd6.

♻️ This comment has been updated with latest results.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.16%. Comparing base (4c0533f) to head (ba5efd6).
⚠️ Report is 244 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3689      +/-   ##
==========================================
+ Coverage   63.07%   63.16%   +0.09%     
==========================================
  Files         612      612              
  Lines       45237    45259      +22     
  Branches       43       43              
==========================================
+ Hits        28531    28587      +56     
+ Misses      16696    16662      -34     
  Partials       10       10              

☔ 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.

Much cleaner this way, I think the original code
was written before the constant existed.
@stveit stveit force-pushed the fix-jwt-breadcrumbs branch from 2c7960c to ba5efd6 Compare January 6, 2026 07:58
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jan 6, 2026

@stveit stveit marked this pull request as ready for review January 6, 2026 10:27
Copy link
Copy Markdown
Contributor

@johannaengland johannaengland left a comment

Choose a reason for hiding this comment

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

Works nicely, always good to have simpler code!

@lunkwill42 lunkwill42 merged commit cd84e05 into master Feb 12, 2026
20 checks passed
@lunkwill42 lunkwill42 deleted the fix-jwt-breadcrumbs branch February 12, 2026 12:30
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.

[BUG] Missing breadcrumbs when Editing or Creating JWT tokens

3 participants