Skip to content

fix(signage-manager): fix brand kit saves and image editor flows - #538

Merged
MrYuion merged 2 commits into
developfrom
fix/signage-manager-image-gen-branding
Oct 2, 2026
Merged

MrYuion merged 2 commits into
developfrom
fix/signage-manager-image-gen-branding

Conversation

@MrYuion

@MrYuion MrYuion commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Branding and the image editor:

  • Palette keys: saving branding renamed or lost them (e.g. {primary, accent} was saved as {primary, secondary}).
  • Overlapping writes: Save and a logo upload could overwrite each other.
  • Double save: double-clicking Save during the image capture created two media items.
  • Closing the editor: it left the job running, with a toast for images nobody could reach.
  • Failed options: a failed option load showed the old image.
  • Logo permission: sys admins could change the logo with branding-editing off.
  • Raw errors: upload failures showed raw upload errors.

Changes

  • Palette: each colour keeps its source key.
  • Writes: brand kit writes are queued in the service.
  • Saving: Save is guarded before the image capture, and waits for the picked image.
  • Closing: cancels the job and deletes references. There is no "ready" toast for a job the open editor shows.
  • Failed options: a failed load shows an error and clears the selection.
  • Permission: a shared canEditBrandKit for the branding page and the editor.
  • Errors: actionError shows an action-specific message and logs the raw error. Only UserFacingError text is shown as is.
  • Smaller fixes: three-digit hex colours, font redraws only when the fonts change, preconditions checked before uploads, and job follow-up through an effect.

Testing

  • Unit tests for each fix. Each fails without its fix.
  • nx test signage-manager (986) and nx build signage-manager pass.
  • Local PlaceOS stack (image-gen endpoints and uploads mocked; the stack has neither): palette round-trip, concurrent writes, branding-editing off, double save, close while generating, blocked option, error messages, #000 shade. The brand kit was restored afterwards.

Notes

  • Restored jobs after a page reload still show "ready" with no way to reach the images (app.component.ts). This is out of scope.

Independent of the other signage PRs from this review. Based on develop.


Changes made by Claude Opus 5.5 (1M context) in Claude Code, running in T3 Code.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 2, 2026

Copy link
Copy Markdown

Deployment failed for project frontend-templates with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/placeos?upgradeToPro=build-rate-limit

@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Fixes brand kit saves and image editor flows.

The PR appears safe to merge; the three earlier job-cleanup findings are addressed.

What we checked:

  • Closed job keeps its images: The service keeps watching a refused cancellation and removes the attached images when the job ends.
  • Failed request leaves images: Both request paths call _removeReferences when they fail after the editor closes.

Summary

The PR fixes brand-kit palette saves and overlapping writes, while tightening the signage image editor’s save, permission, and job flows.

  • Palette colours keep their original keys, and brand-kit writes run one at a time.
  • The editor follows the branding-page permission rule and guards image saves and job cleanup.
  • Action failures show clearer messages; small canvas changes support short hex colours and avoid repeat font loading.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Editor starts job] --> B{Editor still open?}
  B -- Yes --> C[Show result in editor]
  B -- No --> D[Ask server to cancel]
  D --> E{Job has ended?}
  E -- No --> F[Keep watching]
  F --> E
  E -- Yes --> G[Remove attached images]
Loading

Reviews (2) · Last reviewed commit: "fix(signage-manager): clean up image job..."

Comment thread apps/signage-manager/src/app/image-gen/image-gen-modal.component.ts Outdated
Comment thread apps/signage-manager/src/app/image-gen/image-gen-modal.component.ts Outdated
Comment thread apps/signage-manager/src/app/image-gen/image-gen-modal.component.ts Outdated
@MrYuion

MrYuion commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator Author

LGTM

- Keep palette keys when saving branding.
- Write brand kit changes one at a time.
- Prevent double saves and wait for the picked image before saving.
- Cancel the job when the editor closes.
- Show an error when an option fails to load.
- Respect branding-editing for logo changes.
- Show errors that name the failed action.
- Handle three-digit hex colours and avoid extra font redraws.
…loses

- ImageGenService.abandon cancels a job and keeps watching it, without
  notices, so a refused cancel is still followed and its attached
  images are removed when it ends.
- A generate or refine request that fails after the editor closed
  removes its attached images.
- A job check that returns after the job was unwatched is ignored, so
  a closed editor does not announce ready images.
@MrYuion
MrYuion force-pushed the fix/signage-manager-image-gen-branding branch from 1ad98a5 to fcbcbad Compare October 2, 2026 05:50
@MrYuion
MrYuion merged commit d2ce03c into develop Oct 2, 2026
1 of 2 checks passed
@MrYuion
MrYuion deleted the fix/signage-manager-image-gen-branding branch October 2, 2026 05:59
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