Repository navigation
fix(controlled-documents): do not resolve navigator specials as documents - #11117
Open
MichaelUray wants to merge 1 commit into
Open
MichaelUray wants to merge 1 commit into
MichaelUray wants to merge 1 commit into
Conversation
…ents The documents location resolver treated every third path segment as a document short link. Navigator specials such as 'categories' or 'library' use the same segment, so whenever the resolver ran for them (e.g. on page reload or when switching to the documents app) it looked up a document with that id, logged 'Could not find document categories.' and set the access denied flag. Skip the known navigator special ids in resolveLocation so they are left to the workbench special views. Refs hcengineering#10772 Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #10772
Problem and change
The documents location resolver treated every third path segment as a
document short link. Navigator specials such as 'categories' or 'library'
use the same segment, so whenever the resolver ran for them (e.g. on page
reload or when switching to the documents app) it looked up a document
with that id, logged 'Could not find document categories.' and set the
access denied flag.
Skip the known navigator special ids in resolveLocation so they are left
to the workbench special views.
Tests
New unit test
plugins/controlled-documents-resources/src/__tests__/navigation.test.ts(all navigator specials are not looked up as documents, a normal document link still is);testscripts added to the package so CI runs it.Notes
This addresses the "Could not find document categories" error from the report. The "New category" action itself only opens a dialog and does not navigate; the reported crash may also be related to the installation (the report shows failed model transactions and a disabled documents server plugin), hence "Refs" rather than "Fixes".