Skip to content

Extend profile service to include the profile logic - #344

Open
SharonStrats wants to merge 3 commits into
stagingfrom
feat/profile-logic
Open

SharonStrats wants to merge 3 commits into
stagingfrom
feat/profile-logic

Conversation

@SharonStrats

@SharonStrats SharonStrats commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

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

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.

🟡 Changes recommended

Several mutation paths can lose profile data, ignore supplied fields, or fail to update supported RDF representations.

9 open findings
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.

Comment thread src/profile/sections/shared/rdfList.ts Resolved
@SharonStrats
SharonStrats force-pushed the feat/profile-logic branch 2 times, most recently from 0015a37 to 7f861e8 Compare October 11, 2026 07:21
SharonStrats and others added 2 commits November 8, 2026 07:59
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
SharonStrats requested a balanced review from Copilot November 8, 2026 07:59
@SharonStrats SharonStrats self-assigned this Nov 8, 2026
@SharonStrats SharonStrats added the bug Something isn't working label Nov 8, 2026
@SharonStrats SharonStrats moved this to In review in SolidOS NLNet UI Nov 8, 2026
…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
SharonStrats marked this pull request as ready for review November 8, 2026 08:04

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.

Comment thread src/profile/profileMutationService.ts Resolved
Comment thread src/profile/profileMutationService.ts Resolved
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)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants