Skip to content

fix(artifacts): premium split panel + docx/pdf/xlsx in files view#17

Merged
OmGuptaIND merged 1 commit into
mainfrom
OmGuptaIND/fix-split-artifact
Apr 28, 2026
Merged

fix(artifacts): premium split panel + docx/pdf/xlsx in files view#17
OmGuptaIND merged 1 commit into
mainfrom
OmGuptaIND/fix-split-artifact

Conversation

@OmGuptaIND
Copy link
Copy Markdown
Contributor

Summary

Three related fixes so the right-side artifact/preview UI feels like Claude's split layout instead of a cramped, leaky surface.

  • Artifact panel header redesigned. Collapsed the redundant tabs + head + actions rows into a single 48px header — icon + title + type pill on the left, icon-only Source/Copy/Download/Publish + Close on the right. The tab strip now only renders when 2+ artifacts are open, and SidePanel drops its duplicate generic "Artifacts" header so the panel owns its full chrome.
  • Shell outputs no longer become artifacts. Removed the `shell + content > 500` branch in `extractArtifact` — commands like `pip install …` and `python3 -c "…"` were producing pinned "Code" artifact cards keyed on their command string. They now stay as expandable tool-call chips inline.
  • Files view renders rich documents. `.docx`/`.doc`/`.xlsx`/`.xls`/`.pdf` were being read as UTF-8 text and dumped into a `
    `, showing the binary container as gibberish. They now route through the existing `DocxRenderer` / `XlsxRenderer` / `PdfRenderer` components, and the preview pane was rebuilt with the same premium header bar (wider column — `minmax(420px, 560px)` — full-bleed body, icon-only reload/delete/close).

Files

  • `packages/desktop/src/components/artifacts/ArtifactPanel.tsx`
  • `packages/desktop/src/components/SidePanel.tsx`
  • `packages/desktop/src/components/files/ProjectFilesView.tsx`
  • `packages/desktop/src/lib/artifacts.ts`
  • `packages/desktop/src/index.css`

Test plan

  • Generate a code/markdown artifact in chat — header shows single bar (icon + title + type pill | actions + X), no duplicate "Artifacts" strip above it.
  • Open 2+ artifacts — tab strip appears below the header; with one artifact, it's hidden.
  • Run a long shell command (`pip install …`, `python3 -c "…"`) — output renders inline as an expandable tool-call chip, not as a "Code" artifact card.
  • In the Files view, click a `.docx` — renders the formatted document (mammoth → HTML) instead of UTF-8 garbage.
  • Click a `.pdf` and `.xlsx` — proper renderers fill the preview pane.
  • Resize the window down to 1024px / 900px — preview width adjusts; below 900px the preview hides.
  • Click the X in the preview header — selection clears and the file list reclaims the space.

🤖 Generated with Claude Code

Three related fixes for the right-side artifact/preview UI so it feels
like Claude's split layout instead of a cramped, leaky surface:

- ArtifactPanel: collapse the redundant tabs + head + actions rows into
  a single 48px header — icon + title + type pill on the left, icon-only
  Source/Copy/Download/Publish + Close on the right. Tab strip now only
  appears when 2+ artifacts are open. SidePanel drops its duplicate
  "Artifacts" header so the panel owns its full-height chrome.

- artifacts.ts: stop promoting long shell stdout into "Code" artifacts.
  Commands like `pip install …` and `python3 -c "…"` were producing
  pinned artifact cards keyed on their command string; they now stay as
  expandable tool-call chips inline.

- ProjectFilesView: docx/doc/xlsx/xls/pdf were being requested as UTF-8
  text and dumped into a <pre>, rendering binary gibberish. They now go
  through the existing DocxRenderer / XlsxRenderer / PdfRenderer
  components and the preview pane was rebuilt with the same premium bar
  the artifact panel uses (wider column, full-bleed body, icon-only
  reload/delete/close).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@OmGuptaIND OmGuptaIND merged commit ad412e4 into main Apr 28, 2026
@OmGuptaIND OmGuptaIND deleted the OmGuptaIND/fix-split-artifact branch April 28, 2026 09:56
OmGuptaIND added a commit that referenced this pull request Apr 30, 2026
### Features
- auto-activated skills + builtin document-creation packages (#19)

### Other
- fix(attachments): persist images on disk + lazy-load chips on demand (#20)
- feat(chat): collapsible turn progress + per-turn source cards (#18)
- fix(artifacts): premium split panel + render docx/pdf/xlsx in files view (#17)
- fix(ask-user): commit answers only on explicit submit (#16)
- docs(spec): session log architecture — append-only log + multi-client channel (#15)
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.

1 participant