Resolve corporation names in CorporationLabel via the new /corporations endpoint #41

Closed
opened 2026-07-26 20:30:15 +02:00 by Sirttas · 0 comments
Owner

Summary

CorporationLabel (rendered by SourceLabel for corporation activity sources) currently
shows a generic "Corporation" text plus the logo — it has no way to resolve a real
corporation name. Once mammon exposes /corporations (mammon #23), wire the frontend to
resolve and display the actual corporation name.

Scope

  • Add a corporations Pinia store (gemory/src/corporations/, alongside
    CorporationLabel.vue), modelled on the characters store but lazy per-id: no
    "list all" exists for corporations. findById(corporationId) returns a cached entry or
    calls the single-corp endpoint GET /corporations/{corporationId} and caches the result
    in a ref map. Unresolved ids (404) resolve to undefined.
  • Regenerate the mammon client (src/generated/mammon/) from the updated mammon-api.yml
    so a corporationApi / CorporationResponse is available.
  • Update CorporationLabel.vue to take the resolved corporation (or resolve via the store
    from corporationId) and render the corporation name instead of the literal
    "Corporation", keeping the existing · Division {n} suffix and the logo image.
  • Have SourceLabel.vue drive the corporation branch the same way it does characters
    (resolve through the store, pass the result down), so an unresolved corp falls back
    gracefully to the current generic text.

Out of scope

  • No ticker display (name only for now).
  • No batched/bulk resolution — the mammon bulk endpoint (/corporations?ids=) exists but is
    not used here; keep the store simple with per-id lazy lookups.
  • No changes to how the logo is loaded (still the images.evetech.net CDN by id).

Acceptance criteria

  • CorporationLabel shows the real corporation name for a corporation source, with the
    · Division {n} suffix preserved when a division is present.
  • Name is resolved lazily via a corporations Pinia store hitting
    GET /corporations/{corporationId}, with client-side caching so repeated ids don't
    refetch.
  • An unresolvable corporation id falls back to the current generic label without error.
  • mammon client regenerated from the updated OpenAPI spec.

Related

  • Blocked by mammon #23 (corporation info endpoints).
  • Follows gemory #8 (corporation activity source rendering).

🤖 Generated with Claude Code

## Summary `CorporationLabel` (rendered by `SourceLabel` for corporation activity sources) currently shows a generic **"Corporation"** text plus the logo — it has no way to resolve a real corporation name. Once mammon exposes `/corporations` (mammon #23), wire the frontend to resolve and display the actual corporation name. ## Scope - Add a **corporations Pinia store** (`gemory/src/corporations/`, alongside `CorporationLabel.vue`), modelled on the characters store but **lazy per-id**: no "list all" exists for corporations. `findById(corporationId)` returns a cached entry or calls the single-corp endpoint `GET /corporations/{corporationId}` and caches the result in a ref map. Unresolved ids (404) resolve to `undefined`. - Regenerate the mammon client (`src/generated/mammon/`) from the updated `mammon-api.yml` so a `corporationApi` / `CorporationResponse` is available. - Update `CorporationLabel.vue` to take the resolved corporation (or resolve via the store from `corporationId`) and render the **corporation name** instead of the literal "Corporation", keeping the existing `· Division {n}` suffix and the logo image. - Have `SourceLabel.vue` drive the corporation branch the same way it does characters (resolve through the store, pass the result down), so an unresolved corp falls back gracefully to the current generic text. ## Out of scope - No ticker display (name only for now). - No batched/bulk resolution — the mammon bulk endpoint (`/corporations?ids=`) exists but is not used here; keep the store simple with per-id lazy lookups. - No changes to how the logo is loaded (still the `images.evetech.net` CDN by id). ## Acceptance criteria - [x] `CorporationLabel` shows the real corporation name for a corporation source, with the `· Division {n}` suffix preserved when a division is present. - [x] Name is resolved lazily via a corporations Pinia store hitting `GET /corporations/{corporationId}`, with client-side caching so repeated ids don't refetch. - [x] An unresolvable corporation id falls back to the current generic label without error. - [x] mammon client regenerated from the updated OpenAPI spec. ## Related - Blocked by mammon #23 (corporation info endpoints). - Follows gemory #8 (corporation activity source rendering). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sirttas added the
Status
Blocked
1
Kind/Feature
labels 2026-07-26 20:30:15 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eveal/gemory#41