Repository navigation
Feat/access errors - #893
Open
SharonStrats wants to merge 12 commits into
Open
SharonStrats wants to merge 12 commits into
SharonStrats wants to merge 12 commits into
Conversation
Prompt: Validate the input for each subjectType for agent and agentGroup make sure you can load the doc and see that it has a valid agent, agentGroup, agentClass type, validate origin based on format we have the check in solidlogic already add hostname. Co-authored-by: GPT-5.6 Luna <gpt-5.6-luna@openai.com>
…errors Prompt: When there are errors the results that were successful need to be shown to the user in the open dialog, but they still should not be able to retry unsuccessful updates. Co-authored-by: GPT-5.6 Terra <gpt-5.6-terra@openai.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Failed saves can leave misleading role state, stale validation errors, and duplicate close events.
4 open findings
What changed in this PR
Adds granular access-control error handling while decomposing the modal into focused components.
Changes:
- Reports individual save and validation failures.
- Extracts access-target, grant-draft, and save logic.
- Adds tests for partial failures and target resolution.
| File | Description |
|---|---|
test/components/access-control-modal/buildAccessChanges.test.ts |
Tests change construction. |
test/components/access-control-modal/accessTargetResolver.test.ts |
Tests target resolution. |
test/components/access-control-modal/accessGrantDrafts.test.ts |
Tests grant drafts. |
test/components/access-control-modal.test.ts |
Expands modal integration tests. |
src/components/access-control-modal/types.ts |
Defines events, drafts, and errors. |
src/components/access-control-modal/helpers.ts |
Adds origin normalization. |
src/components/access-control-modal/buildAccessChanges.ts |
Builds queued ACL changes. |
src/components/access-control-modal/applyAccessChanges.ts |
Applies changes with per-item errors. |
src/components/access-control-modal/accessTargetResolver.ts |
Resolves and verifies targets. |
src/components/access-control-modal/accessGrantDrafts.ts |
Manages grant draft models. |
src/components/access-control-modal/AccessControlSharedAccess.ts |
Extracts shared-access UI. |
src/components/access-control-modal/AccessControlSharedAccess.styles.css |
Styles shared-access UI. |
src/components/access-control-modal/AccessControlModal.ts |
Coordinates saving and errors. |
src/components/access-control-modal/AccessControlModal.styles.css |
Retains modal-level styles. |
src/components/access-control-modal/AccessControlGeneralAccess.ts |
Extracts general-access UI. |
src/components/access-control-modal/AccessControlGeneralAccess.styles.css |
Styles general-access UI. |
src/components/access-control-modal/AccessControlErrors.ts |
Renders save failures. |
src/components/access-control-modal/AccessControlErrors.styles.css |
Styles failure details. |
src/components/access-control-modal/AccessControlAddAccess.ts |
Extracts grant-entry UI. |
src/components/access-control-modal/AccessControlAddAccess.styles.css |
Styles grant-entry UI. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
SharonStrats
force-pushed
the
feat/access-errors
branch
from
October 14, 2026 03:07
b549cae to
ccf79f6
Compare
SharonStrats
marked this pull request as ready for review
October 14, 2026 03:07
…istry@5.0.2-0) (latest: rdflib@2.4.1)
Prompt: Pasted the errors from the ci into the chat - can you see why these errors would happen in ci but not locally and fix. Co-authored-by: GPT-5.6 Luna <gpt-5.6-luna@openai.com>
SharonStrats
force-pushed
the
feat/access-errors
branch
from
October 14, 2026 03:31
c41b3f1 to
90bafaf
Compare
Comment on lines
+24
to
+28
| export function getAccessGrantId (authorization: AccessAuthorization): string { | ||
| return getAuthorizationSubjectEntries(authorization) | ||
| .map(subject => `${subject.type}:${subject.iri}`) | ||
| .sort() | ||
| .join('|') |
| this.failed = true | ||
| } | ||
| this.logPendingGrantFailures(failedGrants, true) | ||
| this.clearInputError() |
| action: 'input', | ||
| label: 'Access target', | ||
| targetUri: principal, | ||
| message: error instanceof Error ? error.message : 'Could not verify this access target' |
Comment on lines
+38
to
+39
| } catch { | ||
| return undefined |
Comment on lines
+28
to
+40
| const first: AccessAuthorization = { | ||
| agent: ['https://alice.example/profile#me'], | ||
| agentGroup: ['https://example/group'], | ||
| agentClass: [], | ||
| origin: ['https://example.test'], | ||
| mode: ['Read'] as AccessMode[] | ||
| } | ||
| const second = { | ||
| ...first, | ||
| agent: [...first.agent].reverse(), | ||
| agentGroup: [...first.agentGroup].reverse(), | ||
| origin: [...first.origin].reverse() | ||
| } |
timea-solid
approved these changes
Oct 14, 2026
timea-solid
left a comment
Member
There was a problem hiding this comment.
I looked at the code in general and it looks ok. A lot of great work!
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.



This PR does a major refactor of the code so that all the code is not in one file and many things were simplified.
It also adds error handling using the debug for console logs, displaying errors to the user, handling input errors up front. I'll explain a few details below as well I have included an example of how it will look to the user.
Behavior notes:
Adding new assures valid authorization targets before Save
Could not verify this access targetCould not verify this access targetAll save errors appear in the dialog below
