You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(VCST-6571): new Site Builder for Release #1 (#1)
* feat(VCST-6571): new Site Builder for Release #1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(VCST-6571): serve the storefront GraphQL from Site Builder
Site Builder adds the themeSnapshot query, and answers the x-cms
builderPage query from its own pages: x-cms reads Page Builder for the
preview and page groups, which are missing when Site Builder is
installed instead. The handler and the BuilderPageItem graph type are
replaced after x-cms registered them, so x-cms stays unchanged and the
schema the storefront sees is the same.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(VCST-6571): describe Site Builder in the README and manifest
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(VCST-6571): keep the x-cms name of the builder page GraphQL type
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(VCST-6571): serve the designer search at api/site-builder/search
The Page Builder address stays as a deprecated route: themes made for
Page Builder name it in their section schemas.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(VCST-6571): save markdown fields with their HTML, as the classic designer did
The designer stored a markdown field's bare text, so the storefront showed raw
markdown. It now stores what the schema's resultType asks for: the markdown,
the HTML, or both, with HTML converted by markdown-it set up like the classic
designer's marked (GFM, no soft breaks, heading ids). Raw HTML still passes,
but DOMPurify strips scripts, event handlers, iframes and javascript: links.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(VCST-6571): regenerate the Site Builder API client
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(VCST-6571): refuse script URLs and invalid palette values, sanitize stored HTML
Every save of a page, a shared component or a theme file, a history
restore and a theme publication now refuse javascript:/vbscript: URLs in
any string, data: URLs in link fields of the catalog, and palette tokens
the storefront does not have or values that are not CSS colors. The HTML
the content stores is sanitized with Site Builder's own HtmlSanitizer
instance, set up like the storefront's DOMPurify profile. The snapshot
leaves out palette values that are not colors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(VCST-6571): check only URLs for script schemes, not every text
A title such as "JavaScript: tips" was refused. The scheme check now
reads link and image fields of the catalog, and, with or without it,
the values of keys that name a URL: url, link, href, src, image, images
and names ending in one of them, which covers every link the stand's
pages, theme files and the storefront's section schemas hold.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(VCST-6571): list the designer search at its Page Builder address
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6571): inject the content guard into the controllers
The page, builder and shared component controllers take the guard as a
required dependency instead of falling back to a default instance; the
shared components controller's published constructor resolves it from
the request services, as it does the store service.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(VCST-6571): read Page Builder's configuration when Site Builder's is not set
The GitContent and ThemeSnapshot sections, and the module connection string, fall back to their
Page Builder names, with a deprecation warning at startup listing the old names in use.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(VCST-6571): copy Page Builder settings on Site Builder's first start
A background job, under a distributed lock, copies the global and per-store settings and the GitHub
App connection (re-encrypted under the new data protection purpose) to their Site Builder names,
wherever Site Builder has no stored row. The old names are read from the platform's settings rows,
since the settings manager refuses unregistered names. A flag set at the end keeps it to one run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(VCST-6571): keep only the reasons in Site Builder comments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(VCST-6571): keep only the reasons in Site Builder app comments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(VCST-6571): drop the GitHub App callback step from switching
Page Builder never shipped a GitHub App, so no installed App points at its address.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(VCST-6571): mark Site Builder as beta
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(VCST-6571): sort the Site Builder lists with an explicit comparator
Template keys and rule condition names keep the code unit order a bare
sort() gave; a menu's languages are sorted as text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6571): resolve SonarCloud findings in the Site Builder apps
Split the long designer functions, flatten nested ternaries, rename
shadowing locals, merge duplicate imports and split a two-statement
line in the AngularJS blade. No behaviour change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6571): resolve SonarCloud findings in Site Builder
Name the colour, contrast and size constants, split argument checks from
async bodies, extract helpers from complex methods and controller
actions, and compare colour channels as bytes. Behaviour is unchanged.
Where null or a signature is part of the contract, the finding is
suppressed with its reason: null results that callers tell apart from
empty ones, DI constructors, graphql-dotnet schema constructors, and
git's SHA-1 blob ids.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6571): stop shadowing the shown fields in the markdown text lookup
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6571): give the typed markdown entry a name of its own
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ci(VCST-6571): update the workflows to v3.1000.9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ci: TEMP run auto-tests and swagger-validation on VirtoCommerce/.github#152
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ci: TEMP run auto-tests on VirtoCommerce/vc-test-automation-framework#214
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ci: revert the temporary .github and test branch refs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): move the page content service from Web to Data
MCP tools call the same services as the controllers, and they live in a
project that references Data, not Web.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): move the designer save, discard and theme-file read into an operation service
MCP tools are to save and discard designer changes through the same checks
as the designer endpoints, in the same order. The save takes a dry run that
sanitizes the changes and answers them over the current drafts without
writing, so a tool can show the change before it is made.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): move the page group and multilanguage page writes into operation services
MCP tools are to create, update, publish and link pages through the same
checks as the page endpoints, in the same order. Each write takes a dry run
that checks it as the write would and answers the change instead of making
it, and each result tells whether the write reaches what the storefront
serves, so that a tool can ask for a second approval first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): move theme publication, schema reads, previews and publish status into services
MCP tools are to publish the theme, list templates, read schemas, link previews
and read publish status through the same checks as the endpoints, in the same
order. The theme publication takes a dry run that lists every draft it would
put live with its version and last author, and can be bound to the versions
that were reviewed, so an approval covers exactly what goes live.
Two checks are new for every caller: a theme whose palette fails the WCAG 2.2
AA contrast is refused at publication with the failing pairs, and a template
draft may not remove or hide the main section the template shows its page with.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): refuse a palette below WCAG 2.2 AA only when it is published
The approved rule is that a palette short of the contrast cannot be published,
not that nothing can be published while the live palette fails. A publication
is refused only when it puts a palette draft live; a failing live palette left
as it is is told in the dry run's warnings, so the approver sees it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): move the git page writes, version history and shared components into operation services
MCP tools are to publish, unpublish, promote, restore, copy and discard pages
kept as files, restore history versions and edit shared components through
the same checks as the endpoints, in the same order. Every write takes a dry
run that describes what it would do without doing it, and tells whether it
reaches what the storefront serves: a publish names the merge it would ask
for, not its result, and a shared component's content names the pages it is
placed on. A history restore can be bound to the draft versions the dry run
answered, so it is refused when a draft changed since.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): take the shared component operations through the controller's only constructor
The module has never been released, so no outside code builds the controller
with its older constructor; the controller takes its services from the
container like the others, with no lookup in the request services.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): read the raw page content only after the page and store checks
The raw content save read the request body before the page lookup and the
store check, so a refused request still had its body read. The operation
now takes a content reader and calls it once the checks pass, which keeps
the endpoint's original order without the service knowing about HTTP.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): tell how far a write reaches only when the caller asks
Telling whether a write reaches the storefront can take reads the write
does not need: a shared component save read every page the component is
placed on, and a multilanguage page write ran its preview first. The REST
endpoints never use the answer, so a failing usage query could fail a save
that used to succeed. A write request now carries ReportImpact; a write
that runs fills AffectsPublished only when it is set, while a dry run
always does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): leave the git read cache alone on a dry-run promotion
A dry run is to change nothing, yet the promotion dropped the cached reads
of both branches before it knew it was only a preview. The cache is now
dropped only for a promotion that runs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): preview the designer discard on a dry run
Every other designer write takes a dry run; the discard threw the drafts
away with no way to see first what would go. The dry run makes the same
checks and answers each draft it would throw away with what it goes back
to, built from the page, file page and theme file previews. A file page
kept in git gets a preview of its own, since the discard deletes the
user's branch there rather than a blob draft.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): cover the main-section check on the legacy theme save
The legacy save validates theme drafts through the designer operations
too. Its paths carry the theme folder, as the draft read of the check
expects, so the check compares with the template the store holds: its
draft, else what is live. The tests pin that down for the endpoint.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): move the file page search and git history into the content query service
MCP tools are to list the pages of a folder and read a page's versions through
the same checks as the endpoints, in the same order. The search still lists
from blob storage on the git flow, and the versions keep telling which are the
user's own, so both endpoints answer exactly as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): split the long operation methods into smaller steps
SonarCloud fails the quality gate on the methods that moved into the operation
services: too many branches in one method, a nested conditional, a bare number,
a dictionary answered as null and an argument check inside an async method.
Each is split into named steps in the same order, so the checks run and the
responses read as before. A restore without expected versions now carries an
empty set of them, which the designer service already reads the same as none.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): let a caller pin the version it reviewed on publish, unpublish and discard
A write approved by a second person runs again as the approver, so it
could ship a draft that changed after the review, or the approver's own
git branch. Each publish, unpublish and discard now takes the versions
its dry run tells (content ETag, theme file and file page draft
versions, git draft branch head) and refuses with a conflict once they
moved; a git publish or unpublish can name whose draft branch it ships.
The versions are compared under the write's lock where there is one.
Every new input is optional and the REST endpoints never send one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6842): hold the reviewed versions where the writes take them
Several pins were compared before the write instead of at it, so a
change landing in between went through under an approval it never had.
A pinned git publish or unpublish now merges the approved commit from a
publish branch of its own rather than the editor's branch, which GitHub
would merge wherever it is once the checks pass. The database discard
compares and deletes under the group's lock; settings updates, links,
resets and marking a translation up to date read their condition under
the lock of their save; file page saves and restores commit only over
the file they compared, without the stale-file retry. Blob storage has
no lock, so its content version is read right before the write.
Every new input is optional and the REST endpoints never send one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(VCST-6442): check permalink conflicts on publishing
Ported from VirtoCommerce/vc-module-pagebuilder#179.
Co-authored-by: Basil Kotov <basilkot@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(VCST-6442): warn about duplicate permalinks and resolve conflicts on publishing in the page blade
Ported from VirtoCommerce/vc-module-pagebuilder#179.
Co-authored-by: Basil Kotov <basilkot@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(VCST-6571): resolve permalink conflicts on publishing from the designer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(VCST-6571): build on xAPI 3.1028.0, which no longer brings AutoMapper
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6571): resolve SonarCloud findings
Split the conflict parsing out of the designer's publish, the dry run and
the save condition out of the page group update, the content preload out
of the grouped page save and the bad request out of the refusal mapping.
CommitFileIfUnchangedAsync checks its arguments before its async body,
overloads sit together, and the drafts to publish are filtered with Where.
The DI constructor of MultilanguagePageService is suppressed with the
reason the other services give. Behaviour is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6571): resolve the analyzer suggestions SonarCloud reports
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6571): always open the Vue designer and use the new publish flow
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6571): remove the Angular designer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6571): build the themeSnapshot query with QueryBuilder
The query declares its arguments and maps them itself, as the xAPI base
classes expect, in place of a hand-built ISchemaBuilder field. The GraphQL
contract stays the same.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* refactor(VCST-6571): name the settings SiteBuilder.*, as recent modules do
The settings drop the VirtoCommerce. prefix. Page Builder's two migration
flags keep their names, so a migration it already ran is not run again, and
the locales now carry their texts under those names.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(VCST-6571): put files where their names and namespaces say
- The repository registration moves to Web/Extensions, so its namespace
matches its project.
- The shared component propagation job moves to BackgroundJobs.
- IContentStreamProvider.cs is renamed after the interface it declares.
- The asset reference index interface gets its own file.
- The themeSnapshot content description names Site Builder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(VCST-6571): reload the page in the designer after the AI assistant saves it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(VCST-6571): read the new language version back before loading its content
The test database has no platform auditing, so the created version keeps
an empty CreatedDate, which SQLite stores shifted by the machine's time
zone; the test failed outside UTC.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(VCST-6571): check content saved without a catalog hash against the store's current catalog
Content saved without a catalog hash, or with an unknown one, was checked
without a schema, so a data: link or script in an HTML field was stored as
sent. Every save and restore path now checks it against the store's current
catalog; only a store without a catalog keeps the schema-less checks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(VCST-6571): describe a template entry's default in the preview contract
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(VCST-6571): sanitize a markdown field's plain string as the HTML the storefront shows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(VCST-6571): refuse a git store's content while GitHub is not connected
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(VCST-6571): keep the global git switch sending every store to blob
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(VCST-6571): warn in the builder when a git store has no GitHub connection
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ci(VCST-6571): update GitHub Action workflows to v3.1000.11
Same files the vc-ci workflow update put into the other modules
(VCST-6129): VirtoCommerce/.github v3.1000.11, setup-vcbuild@stable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(VCST-6571): make CheckCreateRequest static
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Basil Kotov <basilkot@gmail.com>