# Keystone Scrubber Implementation Plan

> [!WARNING]
> Skip automated browser testing for these component changes. The user (Bill) will perform manual verification to avoid token usage from screenshots/images.

## Driving Problem
In the previous monolithic parent/child component refactoring, the `<ibgib-keystone-details>` component was designed to handle *both* displaying metadata for a single keystone frame, and managing/scrubbing through the timeline history.
Because it was a child component managed by the `<ibgib-identity-manager>` tab view, it was instantiated dynamically via `getComponentInstance()`. But since it was not yet injected into the DOM, its custom element `connectedCallback()` and `created()` methods had not run. Consequently, `loadIbGib()` was never triggered, leaving its `this.ibGib` property `undefined` at initialization time and throwing errors when the parent manager attempted to read its backing data.

## Solution: Separating Concerns with a Scrubber Parent Component
To resolve this, we will introduce a new `<ibgib-keystone-scrubber>` component. 
* **`<ibgib-keystone-scrubber>` (Parent)**: Acts as the parent component for a keystone's timeline. It loads history, renders the scrubber navigation toolbar (scrub buttons and status), and acts as a `Parent` component that injects a details view child component for whichever frame address is selected.
* **`<ibgib-keystone-details>` (Child)**: A simple, static child component that only renders the details of a *single* specific keystone address. It does not manage history or scrubber state. It overrides `initialize()` to call `loadIbGib()`, ensuring `this.ibGib` is populated immediately upon instantiation.

---

## Tasks Checklist

- [ ] Register new component metadata
  - [ ] Register `KeystoneScrubberComponentMeta` in [space-gib-shell-service.mts](file:///c:/Users/billm/antigravity/ibgib/apps/space-gib/src/client/ui/shell/space-gib-shell-service.mts)
- [ ] Create Scrubber component files
  - [ ] Create [keystone-scrubber.html](file:///c:/Users/billm/antigravity/ibgib/apps/space-gib/src/client/components/keystone-scrubber/keystone-scrubber.html) containing the scrubber header layout and a `#keystone-scrubber-content` slot
  - [ ] Create [keystone-scrubber.css](file:///c:/Users/billm/antigravity/ibgib/apps/space-gib/src/client/components/keystone-scrubber/keystone-scrubber.css) for scrubber-specific bar and button stylings
  - [ ] Create [keystone-scrubber.mts](file:///c:/Users/billm/antigravity/ibgib/apps/space-gib/src/client/components/keystone-scrubber/keystone-scrubber.mts) extending `IbGibDynamicComponentInstanceBase_Parent` to manage the history array and child detail views
- [ ] Refactor details component to be static
  - [ ] Simplify [keystone-details.html](file:///c:/Users/billm/antigravity/ibgib/apps/space-gib/src/client/components/keystone-details/keystone-details.html) to remove all scrubber header elements
  - [ ] Simplify [keystone-details.css](file:///c:/Users/billm/antigravity/ibgib/apps/space-gib/src/client/components/keystone-details/keystone-details.css) to remove scrubber styles
  - [ ] Modify [keystone-details.mts](file:///c:/Users/billm/antigravity/ibgib/apps/space-gib/src/client/components/keystone-details/keystone-details.mts) to extend standard `IbGibDynamicComponentInstanceBase`, load `loadIbGib()` inside `initialize()`, and remove history/scrubbing logic
- [ ] Update Parent Identity Manager to point to Scrubber
  - [ ] Update `getLoadedChildInfo` in [identity-manager.mts](file:///c:/Users/billm/antigravity/ibgib/apps/space-gib/src/client/components/identity-manager/identity-manager.mts) to instantiate `ibgib-keystone-scrubber` instead of `ibgib-keystone-details`
- [ ] Compile and verify
  - [ ] Compile space-gib via `npm run build:space-gib` (and `npm run chain:build:web-gib` if web-gib changes are needed)
  - [ ] Restart space-gib server and manually verify tab switching and timeline scrubbing
