Skip to content

Support for the Input feature on the Manage access dialog - #336

Open
SharonStrats wants to merge 2 commits into
stagingfrom
feat/access-input
Open

SharonStrats wants to merge 2 commits into
stagingfrom
feat/access-input

Conversation

@SharonStrats

@SharonStrats SharonStrats commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

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.

@SharonStrats
SharonStrats requested a balanced review from Copilot October 4, 2026 08:46
@SharonStrats SharonStrats self-assigned this Oct 4, 2026
@SharonStrats SharonStrats added the enhancement New feature or request label Oct 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 High severity · 4 Medium severity

Open (5)
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 SolidLogic and 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.

Comment thread src/directory/contactsDirectory.ts Outdated
Comment thread src/acl/accessControlSubjects.ts Outdated
Comment thread src/directory/catalogDirectory.ts Outdated
Comment thread src/directory/directoryHelpers.ts Outdated
Comment thread src/directory/directoryLogic.ts Outdated
@SharonStrats
SharonStrats force-pushed the feat/access-input branch 2 times, most recently from e70a11d to 8e11fb8 Compare October 4, 2026 20:02
import { ns } from '../util/ns'
import { isHttpUri, labelForNode, loadDocumentSilently, uniqueNamedNodes } from './directoryHelpers'

const CONTACT_CARD_CONCURRENCY = 8

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@timea-solid what are your thoughts with this number for concurrency for contacts? Or should we make these concurrency values configurable?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you explain what this vatiable is actually for? (same for people)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@timea-solid and this one?

some ideas

  1. make one concurrency that can be configured and it is used for all.
  2. each one can be configurable
  3. 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

3 participants