Repository navigation
Extend profile service to include the profile logic - #344
Open
SharonStrats wants to merge 3 commits into
Open
SharonStrats wants to merge 3 commits into
SharonStrats wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Several mutation paths can lose profile data, ignore supplied fields, or fail to update supported RDF representations.
9 open findings
RDF list traversal can loop indefinitely on cycles · New Lossy social presenter drops unnamed accounts and metadata · New Phone updates retain stale direct telephone links · New Heading mutations silently ignore additional operations · New Legacy image predicates prevent image updates and deletion · New Language proficiency is not serialized · New Blank-node community deletion becomes a no-op · New Public-ID-only organizations are discarded · New Blank-node role updates leave stale memberships · New
What changed in this PR
Extends profile logic with typed read and mutation APIs for profile sections, backed by shared RDF utilities and comprehensive tests.
Changes:
- Adds profile selectors, mutation services, and public types.
- Supports RDF lists, legacy profile formats, ordering, and metadata normalization.
- Adds broad profile-section test coverage and shared container/URI utilities.
| File | Description |
|---|---|
test/profileSocialRead.test.ts |
Tests social-account reading. |
test/profileResumeSelectors.test.ts |
Tests resume selection and ordering. |
test/profileReadLogic.test.ts |
Tests singleton profile reads. |
test/profileProjectSelectors.test.ts |
Tests project loading and selection. |
test/profile-social-presenter.test.ts |
Tests social presentation. |
test/profile-social-mutations.test.ts |
Tests social writes and ordering. |
test/profile-skills-mutations.test.ts |
Tests skill reads and writes. |
test/profile-resume-mutations.test.ts |
Tests resume mutations. |
test/profile-projects-mutations.test.ts |
Tests project mutations. |
test/profile-languages-mutations.test.ts |
Tests language formats and mutations. |
test/profile-heading-presenter.test.ts |
Tests heading presentation. |
test/profile-heading-mutations.test.ts |
Tests heading mutations. |
test/profile-heading-id-node.test.ts |
Tests heading ID-node creation. |
test/profile-education-mutations.test.ts |
Tests education operations. |
test/profile-cv-presenter.test.ts |
Tests CV presentation. |
test/profile-contact-info-mutations.test.ts |
Tests contact operations. |
test/profile-bio-mutations.test.ts |
Tests biography operations. |
src/util/utils.ts |
Adds HTTP URI helpers. |
src/util/containerLogic.ts |
Adds idempotent container assurance. |
src/types.ts |
Expands profile service interfaces. |
src/profile/texts.ts |
Defines profile error messages. |
src/profile/sections/social/types.ts |
Defines social models. |
src/profile/sections/social/selectors.ts |
Presents social accounts. |
src/profile/sections/social/read.ts |
Adds canonical social reader. |
src/profile/sections/social/mutations.ts |
Implements social mutations. |
src/profile/sections/social/helpers.ts |
Adds social metadata helpers. |
src/profile/sections/skills/types.ts |
Defines skill models. |
src/profile/sections/skills/selectors.ts |
Reads profile skills. |
src/profile/sections/skills/mutations.ts |
Implements skill mutations. |
src/profile/sections/shared/types.ts |
Defines shared mutation types. |
src/profile/sections/shared/text.ts |
Adds text normalization helpers. |
src/profile/sections/shared/rdfMutationHelpers.ts |
Adds RDF update utilities. |
src/profile/sections/shared/rdfList.ts |
Adds RDF-list expansion. |
src/profile/sections/shared/projectCommunityNodes.ts |
Resolves community project nodes. |
src/profile/sections/shared/profileVocabularies.ts |
Centralizes profile vocabularies. |
src/profile/sections/shared/mutationErrors.ts |
Wraps mutation errors. |
src/profile/sections/shared/idNodeFactory.ts |
Generates profile ID nodes. |
src/profile/sections/resume/types.ts |
Defines resume models. |
src/profile/sections/resume/selectors.ts |
Reads and sorts roles. |
src/profile/sections/resume/mutations.ts |
Implements resume mutations. |
src/profile/sections/projects/types.ts |
Defines project models. |
src/profile/sections/projects/selectors.ts |
Loads and presents projects. |
src/profile/sections/projects/mutations.ts |
Implements project mutations. |
src/profile/sections/languages/types.ts |
Defines language models. |
src/profile/sections/languages/selectors.ts |
Reads language formats. |
src/profile/sections/languages/normalization.ts |
Normalizes language identifiers. |
src/profile/sections/languages/mutations.ts |
Implements ordered language writes. |
src/profile/sections/heading/types.ts |
Defines heading models. |
src/profile/sections/heading/selectors.ts |
Presents profile headings. |
src/profile/sections/heading/mutations.ts |
Implements heading mutations. |
src/profile/sections/education/types.ts |
Defines education models. |
src/profile/sections/education/selectors.ts |
Reads education records. |
src/profile/sections/education/mutations.ts |
Implements education mutations. |
src/profile/sections/contactInfo/types.ts |
Defines contact models. |
src/profile/sections/contactInfo/selectors.ts |
Reads contact information. |
src/profile/sections/contactInfo/rdfBuilders.ts |
Builds contact RDF statements. |
src/profile/sections/contactInfo/mutations.ts |
Implements contact mutations. |
src/profile/sections/bio/types.ts |
Defines biography models. |
src/profile/sections/bio/selectors.ts |
Reads biography details. |
src/profile/sections/bio/mutations.ts |
Implements biography mutations. |
src/profile/profileMutationService.ts |
Coordinates profile writes. |
src/profile/profileLogic.ts |
Exposes profile reads and mutations. |
src/profile/ontology/social/accounts.ts |
Defines social account metadata. |
src/index.ts |
Exports the profile API. |
src/acl/accessControlSubjects.ts |
Exports origin URL detection. |
package-lock.json |
Updates the toolkit lock entry. |
🧠 Review effort: Balanced
💡 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/profile-logic
branch
2 times, most recently
from
October 11, 2026 07:21
0015a37 to
7f861e8
Compare
Prompt: Created 2 docs and pointed copilot to them, one for the best strategies for working with data in solidos and another to all the problems I found with the profile mutations. Told it copy the logic in profile-pane for mutations to solid-logic, extend the profile service and expose these methods. After that performed many cleanup tasks to simply/cleanup the code even further. Co-authored-by: GPT-5.6 Luna <gpt-5.6-luna@openai.com>
Prompt: Move the selection for profile pane to solid-logic profile service. Co-authored-by: GPT-5.6 Luna <gpt-5.6-luna@openai.com>
SharonStrats
force-pushed
the
feat/profile-logic
branch
from
November 7, 2026 20:59
7f861e8 to
cca55e1
Compare
…like the legacy, to avoid many of the issues that were arising with them on PATCH. Prompt: did a complete investigation and worked through the issues one by one with the help of Copilot Co-authored-by: GPT-5.6 Luna <gpt-5.6-luna@openai.com>
SharonStrats
force-pushed
the
feat/profile-logic
branch
from
November 8, 2026 08:03
14ed687 to
4f2f30d
Compare
SharonStrats
marked this pull request as ready for review
November 8, 2026 08:04
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unserialized profile saves can overwrite concurrent changes or restore stale snapshots, while unresolved mutation defects can duplicate entries, retain outdated values, and delete shared data.
13 open issues
Serialize profile mutations per document · New Reloading loses blank-node targets in pending mutations · New Email updates delete the wrong predicates · New Direct email links are not migrated on update · New Heading updates fail to replace direct email links · New Preserve shared language names when removing entries · New Track blank membership nodes when replacing project links · New Infer ongoing roles as current when no end date exists · New Preserve unrelated membership types during updates · New Replace stale organization types when changing orgType · New Preserve shared skill public IDs when deleting entries · New Public-ID-only organizations are discarded Legacy image predicates prevent image updates and deletion
7 resolved since last review
Lossy social presenter drops unnamed accounts and metadata RDF list traversal can loop indefinitely on cycles Blank-node role updates leave stale memberships Blank-node community deletion becomes a no-op Language proficiency is not serialized Heading mutations silently ignore additional operations Phone updates retain stale direct telephone links
Review effort: Balanced
Comment on lines
+157
to
+159
| const entryKey = normalizeProjectUrlKey(project.sourceNode || '') | ||
| const urlKey = normalizeProjectUrlKey(project.url) | ||
| const removedDoc = (entryKey && removeExistingUrl(entryKey)) || (urlKey && removeExistingUrl(urlKey)) || doc |
| resume.orgPublicId | ||
| ].some((value) => Boolean(trimText(value))) | ||
| if (linkedOrganization && isNamedOrBlankNode(linkedOrganization) && hasOrganizationData) { | ||
| ;[ns.schema('name'), ns.org('location'), ns.schema('uri'), ns.schema('url'), ns.solid('publicId')] |
Comment on lines
+65
to
+68
| const collectLinkedPublicIdStatements = (skillNode: NamedNode) => { | ||
| const linkedPublicIdStatements = collectLinkedNodeStatements(store, skillNode, ns.solid('publicId'), doc) | ||
| deletions.push(...linkedPublicIdStatements.linkedStatements) | ||
| } |
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.


Just trying it out we can decide not to use it.