Spec: Dojo to Angular dotAI portlet migration (#37417) - #37418
Conversation
Spec-Kit PR 1 of 2 — spec.md alone, no implementation. Covers the five-tab rebuild (Search, Chat, Image, Embeddings, Config Values), the swap-in-place rollout with an unlisted legacy twin, two defects fixed along the way (inner-product silently behaving as cosine, response-length minimum advertised as 10 against a server minimum of 128), and the non-administrator dead end the current screen has no state for. Three capabilities are dropped on purpose and recorded in Out of Scope: chat sources, the raw structured-response mode, and the recent-image- prompts list. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Claude finished @fmontes's task in 1m 31s —— View job Spec review — dotAI portlet rebuildReviewed as a contract, not code. The spec is well-scoped: removals are called out explicitly rather than smuggled, the rollout mirrors the established Verified claims
New Issues
Minor
No contract-level correctness errors. The three Medium items are refinements for |
…enforced Planning verified the backend: there is no @Valid anywhere in com.dotcms.ai.rest, so CompletionsForm's @min(128) on responseLengthTokens is decorative. The builder's own default for that field is 0, which violates its own annotation. So the legacy min="10" does not produce a server error, as the spec claimed — it produces a silently truncated answer. The requirement is unchanged (the field enforces 128); only the reason it matters is corrected. The field is the one place the declared limit can be honored. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Spec updated — one correction from the planning phase, pushed as a6583b0. FR-023 claimed the server rejects a response length below 128 tokens. It does not. There is no The requirement is unchanged (the field enforces 128). Only the reason it matters is corrected: the field is the one place the declared limit can be honored. FR-024 was re-verified and stands as written — |
…t a URL Browser validation against a running instance: /c/dotai-legacy redirects to the starter portlet rather than loading the old screen. So do /c/es-search-legacy, /c/velocity_playground-legacy and /c/query-tool-legacy — the guard rejects any portlet absent from the user's layout, and the twins are deliberately in no layout. The spec said the old screen "MUST remain reachable at a separate documented address", which overstates it and matters because this is the rollback story. Restoring it is an administrator adding the portlet to a layout — still no redeploy, which is the property that counts. FR-002, US7, SC-008 updated; US7 gains a scenario for the not-in-any-layout case so the behavior is stated rather than discovered. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Implementation is up in #37423, branched off this spec branch as the flow requires — so until this merges, that diff also carries the spec commit. All 57 functional requirements are implemented and Two corrections landed on this PR while building, both from measuring the running product rather than reading the source — FR-023 (the 128-token minimum is declared but not enforced) and FR-002 (the legacy twin needs a layout, not just a URL). Worth a re-read of those two before approving. |
Co-authored-by: fmontes <751424+fmontes@users.noreply.github.com>
Spec-Kit PR 1 of 2 — the spec alone. No implementation. Review it as a contract, not as code: is this the right problem, scoped right, with criteria a reviewer could check?
Closes nothing yet — implementation lands in PR 2, which will link back here.
What this is
Dojo → Angular migration of the dotAI portlet (#37417), following the approved redesign. The legacy four tabs become five — Search, Chat, Image, Embeddings, Config Values — with a shared retrieval-settings panel on Search and Chat and a guided index dialog on Embeddings.
No new functionality. Every screen maps onto behavior that already ships, so there is no backend work beyond portlet registration.
Rollout follows the ES Search (#34733) and Velocity Playground (#34737) precedent: the new screen takes over the existing
dotaimenu entry so upgrades need no manual step, and the old screen stays reachable at an unlisteddotai-legacyaddress for rollback.What's worth your attention
Three capabilities are dropped on purpose. Each is behavior a user has today, so each deserves an explicit nod rather than silent acceptance:
All three remain on the legacy screen while it exists.
Two defects get fixed along the way (FR-023, FR-024): the "Inner Product" distance option sends a value the server does not recognize, so it silently behaves as cosine; and the response-length field advertises a minimum of 10 tokens against a server minimum of 128.
One dead end gets closed (US6, FR-049): a user with portlet access but not the administrator role index operations require currently gets an empty index list and an empty picker, leaving Search and Chat silently unusable with no explanation. The approved design has no state for this either.
One deliberate deviation from the design (FR-053): the portlet renders in the installation's configured theme color, not the design's specific brand color. That color is customer-configurable at runtime, so hardcoding it would leave a branded admin with one screen in someone else's palette. If the design's color is meant as a new product-wide brand, that's a separate app-wide change.
One piece of genuinely new behavior (FR-018): the retrieval-settings panel persists between visits. The legacy screen never stored those controls. Called out rather than smuggled in.
Contents
specs/37417-dotai-portlet-rebuild/spec.md— 7 prioritized user stories, 57 functional requirements, 12 success criteria, edge cases, key entities, Out of Scope, and the dotCMS Legacy Considerations section.Next: approval here unblocks
/speckit-plan. It doesn't need to merge first — PR 2 branches off this branch.