Skip to content

fix(app): resolve grain art avatars in electron builds#1975

Merged
benjaminshafii merged 1 commit into
devfrom
fix-static-avatar-prod-assets
May 27, 2026
Merged

fix(app): resolve grain art avatars in electron builds#1975
benjaminshafii merged 1 commit into
devfrom
fix-static-avatar-prod-assets

Conversation

@benjaminshafii
Copy link
Copy Markdown
Member

Summary

  • Resolve static grain art avatar URLs against Vite's build base instead of the filesystem root
  • Keeps dev URLs root-relative while Electron packaged builds use relative file URLs

Root Cause

  • The static avatar helper returned /grain-art/...
  • Dev runs from http://localhost:5173, so that resolves to http://localhost:5173/grain-art/... and loads
  • Production Electron loads the renderer from file://.../dist/index.html, so /grain-art/... resolves to file:///grain-art/... and fails

Testing

  • pnpm --filter @openwork/desktop build: passed
  • pnpm --filter @openwork/app typecheck: passed
  • CDP inspection before fix: /grain-art/workspaces/workspaces-001.png resolved to file:///grain-art/workspaces/workspaces-001.png and fetch failed
  • CDP inspection of dev: same path resolved to http://localhost:5173/grain-art/workspaces/workspaces-001.png and returned 200
  • CDP inspection of corrected relative production path: ./grain-art/workspaces/workspaces-001.png resolved under apps/app/dist and returned 200

No screenshot/video captured; this was verified through CDP URL/fetch inspection.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview, Comment May 27, 2026 3:38pm
openwork-den Ready Ready Preview, Comment May 27, 2026 3:38pm
openwork-den-worker-proxy Ready Ready Preview, Comment May 27, 2026 3:38pm
openwork-landing Ready Ready Preview, Comment, Open in v0 May 27, 2026 3:38pm

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@benjaminshafii benjaminshafii merged commit 93ce1b5 into dev May 27, 2026
11 checks passed
benjaminshafii added a commit that referenced this pull request May 27, 2026
* feat(app): combine browser and artifacts views and state

* ignore: update download stats 2026-05-27

* feat(app): use static grain art avatars (#1970)

* fix(den): restore org subscription TypeID prefix (#1974)

* fix(app): resolve grain art avatars in electron builds (#1975)

* test(app): add voice mode CDP audio check (#1976)

* test(app): add voice mode CDP audio check

* fix(app): wait for voice CDP target readiness

* fix(desktop): require explicit audio media permission

* fix(desktop): keep fake media behind permission handler

* test(app): capture voice CDP proof

* fix(desktop): request mac microphone access for voice

* fix(app): harden voice CDP runner

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: ben <ben@prologe.io>
Co-authored-by: Source Open <gh2@mcadam.io>
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