Skip to content

dotAI: split the build/delete dialog and fix silent index actions #37543

Description

@fmontes

Description

The Embeddings tab packs two opposite actions into one "Build an index" dialog, and none of the destructive ones tell you what they did. Splitting them and adopting the admin's normal feedback pattern fixes both.

  1. Split the dialog. The Mode toggle makes the form reshape under the user — Fields and Velocity template disappear when you switch to Delete — and puts a destructive action one click from a create action, sharing the same submit button. "Build an index" should only build.
  2. Move "delete from index" onto the index row. It always targets exactly one index, yet today you type the index name into a free-text box: a typo silently deletes nothing, a near-miss hits the wrong index. Launched from the row, the name comes from the row and that whole problem goes away. The row's trash icon becomes a small menu — Remove content… and Delete index.
  3. Say what it actually does. The dialog states none of this: it removes embeddings, not content; the query matches content as it is now, so content that changed and no longer matches is left orphaned and archived or deleted content can't be reached by it at all.
  4. Actions are silent. Rebuild DB, Delete index and Delete from index all give no feedback whatsoever — you confirm something destructive and get nothing back. Delete from index already returns a count from the server; it is thrown away.
  5. Use the admin's feedback pattern. The house rule elsewhere is a toast for transient success and inline messages for failures that need a field corrected. dotAI instead leaves a dismissible banner sitting on the Embeddings tab for a successful build, which no other portlet does.

Open question for the backend

Add and delete do not use the same query semantics: building appends +live:true to your query, deleting appends nothing. So the same string typed into the two does not select the same content. Either the two should match, or the difference is deliberate — letting you clean up embeddings for content that is no longer live — and the dialog should say so. Needs a decision before the copy in item 3 can be written.

Acceptance Criteria

  • "Build an index" has no Mode toggle and only builds
  • Removing content from an index is launched from the index row, with the index as context rather than a typed field
  • That dialog explains that it removes embeddings rather than content, and what its query actually matches
  • Rebuild DB, Delete index and Delete from index all report their outcome, including when nothing matched
  • Success uses the shared toast and failures that need a field corrected stay inline in their dialog, matching the rest of the admin
  • The Embeddings tab no longer carries a persistent banner for a successful build

Additional Context

Follow-up to #37538 / #37541, which fixed the design and QA round on the Angular dotAI portlet. These came out of reviewing how index editing works: there is no way to edit an index, because nothing persists what built it, so add and delete are the only tools and they need to be clear.

Related and worth its own issue: index builds store none of their inputs — not the Lucene query, the fields, the Velocity template or the model — so an index cannot be inspected, edited or re-run, and builds are additive, meaning re-running with a narrower query silently leaves the old content behind.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions