Skip to content

Chat Not Opening Fix#364

Merged
techeng322 merged 5 commits into
mainfrom
techengme/myc-927-p0-chats-not-opening
Jan 30, 2025
Merged

Chat Not Opening Fix#364
techeng322 merged 5 commits into
mainfrom
techengme/myc-927-p0-chats-not-opening

Conversation

@techeng322

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented Jan 30, 2025

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
recoup-chat ✅ Ready (Inspect) Visit Preview Jan 30, 2025 3:07pm

@techeng322 techeng322 changed the title I trigger the build Chat Not Opening Fix Jan 30, 2025
@techeng322 techeng322 merged commit 30f8eef into main Jan 30, 2025
recoup-coding-agent pushed a commit that referenced this pull request Mar 27, 2026
Add image preview support for sandbox (GitHub repo) files on the /files
page. The previous commit only handled Supabase-stored files via
FileInfoDialog. This adds support for the SandboxFilePreview path by:

- Adding getImageContent() to fetch base64 image data via API format=base64
- Extending useSandboxFileContent hook to detect images and return data URLs
- Adding imageUrl prop to FilePreview as alternative to storageKey
- Passing imageUrl through SandboxFilePreview and SandboxFileTree

Depends on API PR #364 (base64 format support for sandbox file endpoint).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sweetmantech added a commit that referenced this pull request Mar 28, 2026
* feat: add image preview support on /files page

When clicking an image file on the /files tab, show the image using a
signed URL instead of "Preview not available for this file type".

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* feat: add sandbox image preview on /files page

Add image preview support for sandbox (GitHub repo) files on the /files
page. The previous commit only handled Supabase-stored files via
FileInfoDialog. This adds support for the SandboxFilePreview path by:

- Adding getImageContent() to fetch base64 image data via API format=base64
- Extending useSandboxFileContent hook to detect images and return data URLs
- Adding imageUrl prop to FilePreview as alternative to storageKey
- Passing imageUrl through SandboxFilePreview and SandboxFileTree

Depends on API PR #364 (base64 format support for sandbox file endpoint).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: remove format=base64 query param, API auto-detects binary files

The API now auto-detects binary files by extension and returns base64
encoding automatically — no need to pass format=base64 in the request.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: consolidate getImageContent into getFileContents, fix loading UX

Address PR review feedback:
- Eliminate getImageContent.ts — the API auto-detects binary files, so
  getFileContents now handles base64 responses and builds data URLs
- Validate data.content before constructing data URLs
- Fix loading state showing false "Preview not available" for images by
  moving loading/error checks before image/isTextFile checks
- Add a spinner to the loading state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: remove storageKey from FilePreview (YAGNI)

storageKey/signed-URL image previews for Supabase-stored files are not
part of this PR's scope. Remove the prop to keep the change focused on
sandbox GitHub image previews only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* revert: drop formatting-only changes to FileInfoDialogContent

Not part of this PR's scope — keeps the diff focused.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: extract getMimeType into existing getMimeFromPath utility (SRP)

Add image MIME types to the existing getMimeFromPath utility and reuse
it in getFileContents instead of an inline function.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: use Skeleton for loading state, move MIME util to lib/files

- Replace loading spinner with shadcn Skeleton component in FilePreview
- Create lib/files/getImageMimeType.ts instead of modifying utils/ (SRP)
- Revert utils/getMimeFromPath.ts to base branch state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: move getMimeFromPath from utils/ to lib/files/, add image MIME types

Move getMimeFromPath to lib/files/ per project conventions (no utils/ path).
Add image MIME types (png, jpg, jpeg, gif, webp, svg) to the existing map
so it can be reused for both text and image MIME resolution (DRY).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: extract FilePreviewSkeleton into its own component (SRP)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: CTO Agent <cto@recoupable.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Sweets Sweetman <sweetmantech@gmail.com>
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