Add functionality to support 3 dots menu - #320
Open
SharonStrats wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a dedicated resource logic module to support resource/container operations needed by the UI (e.g., a “3 dots menu”), including recursive deletion and optional type-index cleanup, and wires it into SolidLogic.
Changes:
- Added
ResourceLogic(newsrc/resource/resourceLogic.ts) to centralize container helpers and recursive deletion (optionally deleting type index registrations). - Enhanced container detection and added a container member-count helper in
containerLogic. - Extended type-index logic with
deleteTypeIndexRegistrationForResourceand exposedresourceonSolidLogic.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/util/utilityLogic.ts | Removes recursiveDelete from utility logic (moved responsibility to resource). |
| src/util/containerLogic.ts | Improves isContainer detection and adds getContainerMemberCount. |
| src/types.ts | Adds ResourceLogic/options and extends TypeIndexLogic/SolidLogic types. |
| src/typeIndex/typeIndexLogic.ts | Adds deletion of type-index registrations that reference a resource. |
| src/resource/resourceLogic.ts | New module implementing resource/container helpers and recursive deletion. |
| src/logic/solidLogic.ts | Wires new resource logic into the main SolidLogic object. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+29
to
+36
| async function recursiveDelete(resourceNode: NamedNode, options: ResourceDeleteOptions = {}) { | ||
| try { | ||
| const resourceParent = resourceNode.dir() | ||
|
|
||
| if (isContainer(resourceNode)) { | ||
| const containerMembers = await containerLogic.getContainerMembers(resourceNode) | ||
| await Promise.all(containerMembers.map((url) => recursiveDelete(url, options))) | ||
| } |
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.
No description provided.