Repository navigation
Feat/access errors - #893
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 <[email protected]>
Prompt: Create shared ACL view models instead of reconstructing them in multiple methods. then rerun unit and e2e tests. Co-authored-by: GPT-5.6 Luna <[email protected]>
…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 <[email protected]>
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.
b549cae to
ccf79f6
Compare
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 <[email protected]>
c41b3f1 to
90bafaf
Compare
timea-solid
left a comment
There was a problem hiding this comment.
I looked at the code in general and it looks ok. A lot of great work!
NoelDeMartin
left a comment
There was a problem hiding this comment.
I haven't look at all the code, but I noticed no actual new components are exported so that looks good to me. Anything that involves simplyfing and refactoring code into smaller files is usually a good thing :).
| title="Some access changes could not be saved" | ||
| message=${this.successfulChangesRefreshed | ||
| ? 'Any successful changes are shown above. The list below shows only the changes that failed. Close this dialog and reopen it if you want to try again.' | ||
| : 'Some changes may have been saved, but we could not refresh the Shared with list. The list below shows only the changes that failed. Close this dialog and reopen it if you want to try again.'} |
There was a problem hiding this comment.
the Shared with list is a terrible name or title reference. Maybe it could be changed to the "Shared with" list or something along those lines? Style changes can also help deliver the clarity I'm hoping for.
There was a problem hiding this comment.
Do you have other suggestions? What do you mean style changes? Do you have style change suggestions for the errors I have put the image in the description? I am open to ideas. I probably shouldn't change the "Shared with " header though bc that was part of the design but the message and the way I have displayed the errors can be changed.
There was a problem hiding this comment.
@TallTed I'm going to need to push this through because we are on a timeline, but I would love to hear your feedback and have a discussion. There is still time to adjust before releasing it. We have another week probably a bit longer. You'll be able to see it on https://pivot-test.solidproject.org:3000 by tomorrow if not before depending on your timezone. Any feedback please create a ticket on solid-ui.
7722a33 to
664919c
Compare



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
