Dojo to Angular: dotAI Portlet
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Context
The dotAI portlet (Developer Tools → dotAI) is the last dotAI surface still on the Dojo/JSP stack. It renders in the legacy iframe route, so it never picks up the admin shell's theme, breadcrumbs or site selector; it carries no translatable text and no automated tests; and it has drifted visually from every other Developer Tools screen sitting next to it. An installation with custom brand colors gets one screen that ignores them.
This migrates it to Angular following the approved redesign. No new functionality — every screen maps onto behavior the product already ships, so there is no backend work beyond portlet registration.
Current state (Dojo)
| Aspect | Value |
|---|---|
| Entry point | Portlet dotai, registered as a JSP portlet and rendered in the legacy iframe route |
| UI | One hand-written script over a global state object, bootstrapped by Dojo, plus a stylesheet that re-declares the admin color palette |
| Tabs | Four — search / chat / image, embeddings, config values |
| i18n | None — every string is hardcoded |
| Tests | None |
| Gating | Portlet access via layout; index operations require an administrator role |
Target state (Angular)
Five tabs — Search, Chat, Image, Embeddings, Config Values — rendered natively inside the admin shell, inheriting its theme, navigation and site context.
- A shared retrieval-settings panel serving both Search and Chat, so a narrowing set up on one carries to the other.
- A guided dialog for creating an index, adding to one, or deleting from one.
- All user-visible text externalized to the language bundle.
- Every data area handles its loading, empty, error and loaded states distinctly.
Same rollout shape as ES Search (#34733), Query Tool (#34735) and Velocity Playground (#34737): the new screen takes over the existing dotai menu entry so upgrades need no manual step, and the previous screen stays reachable at an unlisted dotai-legacy address for rollback.
Gaps this closes
Two defects in the current screen, fixed as part of the migration:
- The "Inner Product" distance option sends a value the server does not recognize, so it silently behaves as cosine.
- The response-length field advertises a minimum of 10 tokens, while the server's own request contract declares a minimum of 128. That contract minimum is not currently enforced server-side, so a smaller value is accepted silently and truncates the answer instead of erroring.
And one dead end the current screen has no state for: a user with portlet access but without the administrator role that index operations require gets an empty index list and an empty index picker, leaving Search and Chat silently unusable with no explanation.
Out of scope
- Any change to indexing, retrieval, generation or storage behavior.
- App-level AI configuration editing (providers, credentials, connection tests) — that stays on the existing dotAI app configuration screens.
- Three capabilities of the current screen are deliberately dropped and will not be rebuilt: sources listed beside chat answers, the raw structured-response mode, and the recent-image-prompts list. All three remain available on the legacy screen while it exists.
Definition of Done
The dotAI portlet running in Angular, working, with the improved design.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.