Skip to content

fix(ui): unblock .pptx upload in Agent UI#1366

Merged
itomek merged 2 commits into
mainfrom
fix/issue-1363-pptx-ui-upload
Jun 3, 2026
Merged

fix(ui): unblock .pptx upload in Agent UI#1366
itomek merged 2 commits into
mainfrom
fix/issue-1363-pptx-ui-upload

Conversation

@itomek
Copy link
Copy Markdown
Collaborator

@itomek itomek commented Jun 2, 2026

The Agent UI hard-blocked PowerPoint uploads even though .pptx RAG shipped end-to-end in #1224 — the RAG backend and the FastAPI ALLOWED_EXTENSIONS already accept .pptx, but the React UnsupportedFeature gate still classified it as an unsupported "Microsoft Office" type and rejected it before upload. A headline feature was unreachable in the UI, and users were filing feature requests (#1072, #1291) for something that already worked. This drops .pptx from the frontend blocklist, adds it to the supported set (now matching the server allowlist exactly), and fixes the now-false rejection copy. .doc/.docx/.ppt/.xls stay blocked. No server change — the backend already accepts .pptx.

Closes #1363

Test plan

  • cd src/gaia/apps/webui && npm test — Vitest 18/18 pass locally (new assertions verify .pptx is accepted and .doc/.ppt/.xls stay blocked). Note: the test-webui-vitest CI job doesn't currently trigger on diffs confined to src/gaia/apps/webui (pre-existing path-filter gap in test_electron.yml), so this was verified locally, not in CI.
  • cd src/gaia/apps/webui && npm run buildtsc && vite build clean
  • code-reviewer pass — no Critical/Advisory findings; independently confirmed the frontend SUPPORTED_EXTENSIONS now matches the server-side ALLOWED_EXTENSIONS and no consumer (DocumentLibrary, FileBrowser) breaks
  • Real-world (Agent UI on an AMD GPU box, Gemma-4-E4B): uploaded a .pptx through the Document Library → accepted (no "Microsoft Office not supported" toast) → indexed (1 chunk via nomic-embed) → Doc Agent answered questions grounded in slide body text (92.7% success rate), a table cell (14.5 Nm torque), and speaker notes (Bluejay-44 codename)

PowerPoint RAG shipped end-to-end in #1224 — the RAG backend and the
FastAPI ALLOWED_EXTENSIONS already accept .pptx — but the Agent UI's
UnsupportedFeature gate still classified .pptx as an unsupported
"Microsoft Office" type and rejected it before upload, leaving a headline
feature unreachable. Drop .pptx from the blocked set, add it to
SUPPORTED_EXTENSIONS (now matching the server allowlist), and fix the
stale rejection copy. .doc/.docx/.ppt/.xls stay blocked.

Refs #1363
@itomek itomek self-assigned this Jun 2, 2026
@itomek itomek marked this pull request as ready for review June 2, 2026 22:12
@itomek itomek requested a review from kovtcharov-amd as a code owner June 2, 2026 22:12
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Summary

Correct targeted fix: .pptx was silently rejected by the React upload gate even though the backend (ALLOWED_EXTENSIONS in src/gaia/ui/utils.py) and RAG pipeline have accepted it since #1224. The frontend SUPPORTED_EXTENSIONS set and UNSUPPORTED_FILE_CATEGORIES blocklist now match the server allowlist exactly. Two files changed, tests pin the behavior in both directions. Three minor/nit findings; none are blocking.


Issues Found

🟢 Minor — featureTitle omits .doc and .ppt from the parenthetical (UnsupportedFeature.tsx:97)

The blocked set after this PR is ['.doc', '.docx', '.ppt', '.xls'], but the feature-request title reads 'Support Microsoft Office (docx, xls) indexing'. A user filing that feature request via the link won't see .ppt or .doc in the title.

        featureTitle: 'Support Microsoft Office (doc, docx, ppt, xls) indexing',

🟢 Nit — Issue reference in test description will rot (UnsupportedFeature.test.tsx:61)

The test name 'returns null for .pptx — PowerPoint indexing shipped in #1224' embeds a GitHub issue number. Per CLAUDE.md conventions, inline issue references rot — the assertion should stand on its own without tracking history.

    it('returns null for .pptx — PowerPoint indexing is supported', () => {

🟢 Nit — First alternative shows "Save as .pptx" to Word users (UnsupportedFeature.tsx:93)

All three alternatives render for every extension in the Microsoft Office category. A .docx upload now shows 'Save modern PowerPoint as .pptx — GAIA indexes .pptx directly' — PowerPoint advice for a Word user. The message body (line 89) already mentions .pptx support, so this alternative adds noise rather than signal for Word/Excel cases.

The cleanest fix here depends on how downstream consumers render alternatives — no one-click suggestion, but worth a follow-up since .pptx now being supported makes the .ppt-specific advice the primary reason this entry exists.


Strengths

  • Exactly minimal: only the two files that needed updating are touched — no collateral reformatting or unrelated edits.
  • Bidirectional test coverage: new tests explicitly assert .pptx is unblocked AND that .ppt/.doc/.xls remain blocked — the risk of regressing in either direction is very low.
  • Code comment update at UnsupportedFeature.tsx:120–121 is a high-value invariant note: it explains why the sets are maintained separately and calls out the python-pptx dependency explicitly, which will save the next contributor from re-checking the backend.

Verdict

Approve with suggestions. The core fix is correct and well-tested. The featureTitle nit (#97) is a one-click apply; the test-name nit is low-stakes but easy to apply. Neither blocks merge.

@itomek itomek enabled auto-merge June 2, 2026 22:33
- featureTitle now lists all blocked Office formats (doc, docx, ppt, xls)
  so the auto-filed feature-request title matches the blocklist
- drop the #1224 reference from a test name so the assertion stands alone
@itomek
Copy link
Copy Markdown
Collaborator Author

itomek commented Jun 2, 2026

Addressed in c955d17:

  • featureTitle — now Support Microsoft Office (doc, docx, ppt, xls) indexing, matching the blocklist (.doc/.docx/.ppt/.xls) exactly so the auto-filed feature-request title is accurate.
  • Test name — dropped the #1224 reference; the assertion now reads returns null for .pptx — PowerPoint indexing is supported and stands on its own.

Deferring the third nit (per-extension alternatives): the alternatives list is rendered category-wide for every Office extension by design — the pre-fix code did the same — so making the .ppt → .pptx tip conditional on the uploaded extension is a rendering change beyond this targeted gate fix. Worth doing as a follow-up rather than widening scope here.

Vitest remains 18/18; neither change touches asserted behavior.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

A focused, correct fix — removes a frontend gate that was silently blocking a feature the backend already supported. Code is clean and all affected paths are consistently updated.

Summary

.pptx support shipped in the RAG backend (#1224) but the React UnsupportedFeature guard never got the memo, leaving users staring at a rejection toast for a capability that already worked end-to-end. This PR makes the frontend tell the truth: drops .pptx from the blocked set, adds it to SUPPORTED_EXTENSIONS, updates the error copy and the alternatives list, and fixes the featureTitle to name only the formats that are still actually missing. No backend changes needed; all three mutation sites in UnsupportedFeature.tsx are updated consistently.

Issues Found

None. No blocking issues identified.

Strengths

  • Surgical scope — exactly three call sites in one file touched, zero unrelated changes. The diff is easy to reason about in its entirety.
  • Tests prove the contract — new assertions verify both directions: .pptx is accepted and the legacy formats (.ppt, .doc, .xls) stay blocked. Covering both sides of the boundary is the right move.
  • User-facing copy is meaningfully improved — the updated alternatives list now gives a clear ranked path (use .pptx directly → convert Word to PDF → re-save legacy Excel), which is more actionable than the previous one-size-fits-all "Save as PDF" suggestion.

Verdict

Approve — ready to merge. The fix is correct, fully tested, and the PR description is a model of how to explain user-observable impact concisely.

@itomek itomek added this pull request to the merge queue Jun 3, 2026
Merged via the queue into main with commit dd38874 Jun 3, 2026
31 checks passed
@itomek itomek deleted the fix/issue-1363-pptx-ui-upload branch June 3, 2026 01:00
kovtcharov-amd pushed a commit that referenced this pull request Jun 3, 2026
19 PRs merged to main after the v0.20.0 notes were drafted; merge main into
the release branch and update the notes to match.

- Multi-Device: note #1338 wired the selector end-to-end (it was a no-op
  after #1252 alone) and added loud runtime validation for unavailable devices.
- PowerPoint RAG: note #1366 unblocked .pptx in the Agent UI file picker
  (backend already accepted it; the frontend rejected it pre-upload).
- Activations: note #1310 widened the "Active for" panel to MCP-consuming
  agents (e.g. the chat agent), not just static REQUIRED_CONNECTORS.
- New bug fixes: RAG embedding reuse (#1306), overlapping-chat-turn 409
  (#1304), Memory/Settings mutual exclusivity (#1368).
- Tooling/CI: doc-vs-code realignment (#1298/#1337/#1340), gaia-testing
  skill (#1372), Claude CI + Codecov hardening.
- Full Changelog regenerated: 44 -> 63 commits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent UI hard-blocks .pptx uploads — backend PowerPoint RAG already works (#1224)

2 participants