move fetch logic and use from solid-logic - #220
Open
SharonStrats wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors source-pane resource fetching by removing the local resourceLoader utilities and switching the UI components to call the solid-logic singleton for content/metadata retrieval.
Changes:
- Removed
src/resourceLoader.tsand updated components to usesolidLogicSingleton.resource.*for fetching content and resource metadata. - Updated
SourceProviderandSourceEditorCardto adapt to the new metadata shape/flow. - Removed
test/helpers.test.jswhich previously validated response-header metadata extraction and fetch+metadata behavior.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/helpers.test.js | Removes unit tests that covered metadata extraction and fetch+metadata behavior. |
| src/resourceLoader.ts | Removes the in-repo fetch/metadata helper functions in favor of solid-logic. |
| src/components/source-provider/SourceProvider.ts | Switches initial content+metadata loading to solidLogicSingleton.resource.fetchContentAndMetadata. |
| src/components/source-editor-card/SourceEditorCard.ts | Switches post-save metadata refresh to solidLogicSingleton.resource.fetchResourceMetadata. |
Suppressed comments (1)
src/components/source-editor-card/SourceEditorCard.ts:202
- The nested
try/catcharound metadata refresh only rethrows the error and doesn’t add any handling; the outertry/catchalready handles failures. Removing the inner block reduces indentation and makes the control flow clearer.
try {
const metadata = await solidLogicSingleton.resource.fetchResourceMetadata(saveSubject as any)
sourceContext.updateMetadata({
contentType: metadata.contentType,
eTag: metadata.eTag
})
this._resetEditorState()
} catch (err) {
throw err
}
💡 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/3-dots-menu
branch
from
August 10, 2026 22:01
f9cba81 to
397575c
Compare
…istry@3.1.2-2 solid-ui@3.1.3-17) (latest: rdflib@2.4.0)
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.