Skip to content

feat(manufacturers): add manufacturer logo support#21

Closed
akira69 wants to merge 6 commits into
Fire-Devils:mainfrom
akira69:feat/manufacturer-logos
Closed

feat(manufacturers): add manufacturer logo support#21
akira69 wants to merge 6 commits into
Fire-Devils:mainfrom
akira69:feat/manufacturer-logos

Conversation

@akira69
Copy link
Copy Markdown
Contributor

@akira69 akira69 commented Apr 1, 2026

--> opened too soon, coming later :)

Summary

Adds manufacturer logo support to FilaMan as a standalone PR based on main, without depending on the export or printing branches.

This PR introduces:

  • backend manufacturer logo storage and URL import support
  • manufacturer logo upload, serving, and clear endpoints
  • manufacturer logo visibility in the manufacturer table and modal
  • manufacturer logo visibility on filament and spool show/edit screens
  • a backend startup fix so Alembic path resolution no longer depends on the process working directory

Plan reference:

  • .copilot/logo-plan-pr857.md

Why

FilaMan needed the non-print manufacturer logo behavior inspired by Spoolman PR 857, but the work should be independent from the unrelated filament export/printing changes.

This branch is intentionally based on main and contains only the logo-related work.

Implementation

Backend

  • Added logo_url and logo_file_path fields to manufacturers plus a migration.
  • Added resolved_logo_url response support.
  • Added manufacturer logo storage helpers.
  • Added endpoints to:
    • upload a local logo file
    • import a logo from a remote URL into local storage
    • serve stored logo files
    • clear a stored logo
  • Updated startup migration path handling to resolve backend/alembic.ini reliably regardless of launch cwd.

Frontend

  • Added a shared manufacturer logo render helper.
  • Added multipart upload support in the frontend API wrapper.
  • Updated the manufacturer modal to support:
    • logo import from URL
    • local file upload
    • stored file path display
    • live logo preview
    • single clear action
  • Added manufacturer logos to:
    • manufacturers list
    • filament detail
    • filament edit
    • spool detail
    • spool edit
  • Refined the manufacturer modal UX:
    • internal scrolling
    • cleaner info modal layout
    • wide logo presentation
    • text fallback when no logo exists

Code Quality Compliance ✅

  • Backend compile validation: passed with backend/.venv/bin/python -m compileall app
  • Frontend build: passed with npm run build
  • Fixed during validation:
    • logo import request schema so the backend accepts the intended { url } payload
    • Alembic startup pathing so backend launch no longer depends on cwd

Validation

Completed:

  • Backend compile check on final branch
  • Frontend build on final branch
  • Live authenticated API smoke test for:
    • login
    • manufacturer create
    • logo import from URL into local storage
    • stored logo fetch from served endpoint
    • clear logo behavior

Notes:

  • The original vendor-hosted test URL returned 429 Too Many Requests during one smoke test run, so the success-path validation used a stable public image URL instead.

Test Checklist

  • Create a manufacturer with a logo imported from URL and verify preview appears in the modal
  • Upload a local logo file for a manufacturer and verify the stored file path updates
  • Clear a manufacturer logo and verify both preview and stored path are removed
  • Confirm manufacturer table rows show wide logos without boxed thumbnails
  • Confirm manufacturers without logos show the styled text fallback
  • Confirm filament detail shows the manufacturer logo correctly
  • Confirm filament edit updates the manufacturer logo preview when the manufacturer changes
  • Confirm spool detail shows the selected filament manufacturer logo correctly
  • Confirm spool edit updates the manufacturer logo preview when the filament changes
  • Confirm manufacturer modal scrolling stays inside the modal rather than scrolling the page behind it

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