Skip to content

Show read-only file mappings in the mappings list #176

Description

@wizzomafizzo

Core now exposes mappings from the mappings/ folder via the mappings API method, in addition to the DB mappings the app already shows. They're returned as read-only entries when the client opts in. The app should surface them so users can see file mappings (not just app-created ones), with editing disabled.

Core change: ZaparooProject/zaparoo-core#973 (Refs zaparoo-core#244).

API contract:

  • mappings accepts an optional includeReadOnly boolean param (default false). When true, the response also includes file mappings.
  • Each MappingResponse now has source ("database" or "file") and readOnly (bool). File mappings have readOnly: true, an empty id, and an empty added.

App work:

  • src/lib/models.ts — add source and readOnly to MappingResponse; pass includeReadOnly: true in CoreAPI.mappings().
  • src/components/MappingRow.tsx — render the read-only state (e.g. a badge/lock, disable tap-to-edit, hide delete) and optionally show the source.
  • src/routes/create.mappings.tsx — ensure read-only rows aren't navigable to the edit route.

Note: editing file mappings (writing back to TOML) is out of scope; this is display only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions