---
fragment_id: oscar.map.side-panel.002
domain: MAP
rule: Side panel for selected layer with editable fields and action buttons
source: app/src/map/SidePanel.tsx
bound_to_modules:
  - oscar.map
status: SHIPPED
version: .002
---

# Side panel (per codex.md §C8 + C6 user sims 8-14)

The side panel is the editable detail view for the currently-selected layer. It opens on selection and closes on deselection (Esc, empty map click, or re-select).

## Fields (in display order)

- **Name** — editable. Click to enter edit mode, type, Enter or blur to commit. Commit triggers a version bump (significant edit per rules.md §10).
- **Kind badge** — display-only. One of 'point', 'line', 'polygon'.
- **Date** — display-only. Shows `created_at` formatted as human-readable date + time.
- **Project** — display-only. Shows the project the layer belongs to.
- **Linked tree** — display + select. If linked, shows tree name + unlink affordance. If unlinked, shows "Link to tree" picker. Linking / unlinking / re-linking is a significant edit per rules.md §10.
- **Notes** — editable multi-line. Not significant (per rules.md §10); no version bump on note edit.
- **Photos** — attach / detach / reorder. Not significant; no version bump.
- **Coordinate list** — display + collapsible. Lists lat / lng per vertex. Collapsed by default for layers with > 4 vertices.

## Action buttons

- **Rename** — same behaviour as editing the Name field directly. Provided as a button for clarity.
- **Delete** — confirms via inline prompt, then deletes the layer from the store and clears selection. Significant edit per rules.md §10.
- **Duplicate** — copies the layer to a target project (defaults to current project). New layer starts at version 1 with a new ID. Significant edit per rules.md §10 for the original (treated as a clone operation; original version is not bumped because the operation creates a new layer).
- **Export** — opens the export menu pre-filtered to this layer. See oscar.map.export-menu.002.
- **Edit vertices** — enters vertex-edit mode on the map (see oscar.map.vertex-editing.002). Side panel shows a hint banner with "Esc to cancel" while vertex-edit is active.

## Version display

A small badge near the top of the side panel shows `v{n}` where n is the current `MapLayer.version`. Updated on every render.