Support for the Input feature on the Manage access dialog - #336
SharonStrats wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Input normalization, nondeterministic merging, WebID detection, origin validation, and failure caching can produce incorrect or stale access subjects.
Review effort: Balanced
Findings: 1
Open (5)
Unvalidated vCard URLs can be mistaken for WebIDs · New Origin validation accepts non-HTTP schemes and query strings · New Failed catalog responses are cached permanently · New Concurrent merges choose nondeterministic labels and sources · New Empty source selection incorrectly falls back to all defaults · New
What changed in this PR
Adds directory-based subject discovery and ACL subject classification for Manage Access input.
Changes:
- Searches contacts, groups, FOAF friends, and the Solid catalog.
- Classifies entered ACL subjects.
- Exposes directory APIs through
SolidLogicand package exports.
| File | Description |
|---|---|
test/directoryLogic.test.ts |
Tests individual directory sources. |
src/types.ts |
Defines directory and ACL APIs. |
src/logic/solidLogic.ts |
Initializes directory logic. |
src/index.ts |
Exports new public APIs. |
src/directory/friendsDirectory.ts |
Discovers FOAF connections. |
src/directory/directoryLogic.ts |
Coordinates directory searches. |
src/directory/directoryHelpers.ts |
Provides matching, merging, and labeling helpers. |
src/directory/contactsDirectory.ts |
Discovers contacts and groups. |
src/directory/catalogDirectory.ts |
Loads catalog entries. |
src/acl/aclLogic.ts |
Exposes subject classification. |
src/acl/accessControlSubjects.ts |
Classifies ACL subject kinds. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
e70a11d to
8e11fb8
Compare
| import { ns } from '../util/ns' | ||
| import { isHttpUri, labelForNode, loadDocumentSilently, uniqueNamedNodes } from './directoryHelpers' | ||
|
|
||
| const CONTACT_CARD_CONCURRENCY = 8 |
There was a problem hiding this comment.
@timea-solid what are your thoughts with this number for concurrency for contacts? Or should we make these concurrency values configurable?
There was a problem hiding this comment.
Can you explain what this vatiable is actually for? (same for people)
There was a problem hiding this comment.
If it repreaents how many people you can add at the same time, than maybe 4-5 or 6 os fine. whatever uou chose. i dont think we need to make it more configurable tha that for now....
There was a problem hiding this comment.
ok this is how many friends or contacts that get processed at once. Basically it was taking way too long to wait until all the contacts and/or friends were processed so I had to process a certain number return the results and then process more, so that the user would see results.
I did this before I added the catalog though, once I added the catalog we get a lot of results... I do think it's still important though because maybe you want to select one of your own contacts or friends then they might not show up for a while if you have a lot of them.
As you suggested, I will leave it as is then and if we find a need later to configure we can.
| import { ns } from '../util/ns' | ||
| import { loadDocumentSilently, storedLabelForNode } from './directoryHelpers' | ||
|
|
||
| const PEOPLE_SEARCH_CONCURRENCY = 6 |
There was a problem hiding this comment.
@timea-solid and this one?
some ideas
- make one concurrency that can be configured and it is used for all.
- each one can be configurable
- since they can choose to use the catalog do not have concurrency at all.
I lean towards 1 so it's simple, but yet can be configured.... what are your thoughts?
8e11fb8 to
813a1d9
Compare
813a1d9 to
918c145
Compare


On the input we needed a search for people and groups so I took what I had done previously and fixed it up a bit, improved the code. Also I decided to make a directory service here so that we can use the service everywhere.
It is configurable, you can pass in what you want to search for one or a combination of friends, contacts, groups, and the catalog from solid. You can also configure how far you want to traverse your friends list, looking for friends of friends and so on. The default is 3.
There are some caveats like your address book/s need to be in your type indexes in order to search for contacts and groups in them.
Here is the original PR SolidOS/solid-ui#725. I think I will close it if we go this way.