S

Knowledge Pack Files

SideButton Dashboard Knowledge Pack Files

Browse the source files that power the SideButton Dashboard MCP server knowledge pack.

Available free v0.4.0 Browser
$ sidebutton install sidebutton.local
Download ZIP
recordings/_skill.md
15.4 KB

What This Is

The Recordings page captures and manages browser interaction recordings. Users can start recording browser actions (clicks, types, navigations, scrolls), stop recording to save the session, view recorded events with color-coded event types, delete recordings, and convert recordings into reusable workflows (basic conversion or AI-enhanced conversion). Requires the browser extension to be connected. Live recording status is pushed via WebSocket on mount.

URL Patterns

ViewURLNotes
Recordings List/recordingsList of all recordings with start/stop controls
Recording Detail/recordings/{id}Single recording with event timeline and conversion options

Page Structure

List View (/recordings)

+--[.header-left: h1 "Recordings" + .item-count badge]--[.header-controls: Start/Stop + Reload]--+
|                                                                                                  |
|  [.warning-banner — amber — if !browserConnected]                                               |
|  [.error-banner — red — if error]                                                               |
|                                                                                                  |
|  [.loading-state — "Loading recordings..." — during fetch]                                      |
|                                                                                                  |
|  [.recording-list]                                                                              |
|    [.recording-card (button)]                                                                   |
|      [.recording-header: .recording-id (mono) + .event-badge "{n} events"]                     |
|      [.recording-meta: timestamp]                                                               |
|    ...                                                                                          |
|                                                                                                  |
|  [.empty-state — when no recordings]                                                            |
|    [.empty-icon (red circle SVG)]                                                               |
|    h2 "No Recordings Yet"                                                                       |
|    description text + .hint text                                                                |
+--------------------------------------------------------------------------------------------------+

Detail View (/recordings/{id})

+--[.back-btn "Back"]--[.header-actions: Delete / Save as Workflow / Convert with AI]--+
|                                                                                       |
|  [.error-banner — red — if error]                                                    |
|                                                                                       |
|  [.meta-section (grid)]                                                              |
|    Recording ID (mono) | Recorded (timestamp) | Events (count)                       |
|                                                                                       |
|  [.events-section]                                                                   |
|    [.events-container (monospace)]                                                   |
|      [.event-item]                                                                   |
|        .event-index "#N" | .event-type (color-coded) | .event-details               |
|      ...                                                                             |
|                                                                                       |
|  [.raw-section]                                                                      |
|    .raw-json <pre> (max-height 400px, scrollable)                                   |
|                                                                                       |
|  [.not-found — "Recording not found." — if ID invalid]                              |
+---------------------------------------------------------------------------------------+

Key Elements

List View — Header

ElementSelectorNotes
Page title.header-left h1Text: "Recordings"
Count badge.header-left .item-countShows $recordings.length (e.g., "3")
Header controls wrapper.header-controlsContains Start/Stop button group and Reload
Start Recording button.header-controls .btn-primaryHas circle SVG icon; disabled when !browserConnected
Stop button.header-controls .btn-stopHas square SVG icon; visible only while recording
Recording status container.recording-statusVisible only while $recordingStatus.is_recording is true
Recording pulse dot.recording-status .recording-pulseRed animated dot
Recording label.recording-status .recording-labelText: "Recording ({eventCount} events)" — updates live via WebSocket
Reload button.header-controls .reload-btnHas refresh SVG icon; reloads recording list from API

List View — Banners

ElementSelectorNotes
Warning banner.warning-bannerAmber/orange background; shown when !$mcpStatus.browser_connected; has alert SVG icon
Warning text.warning-bannerText: "Browser extension not connected. Install and enable the extension to record."
Error banner.error-bannerRed background; shown on API or recording error

List View — Loading & Empty States

ElementSelectorNotes
Loading state.loading-stateText: "Loading recordings..."; shown during initial fetch
Empty state container.empty-stateShown when $recordings.length === 0 and not loading
Empty icon.empty-state .empty-iconRed circle SVG
Empty heading.empty-state h2Text: "No Recordings Yet"
Empty description.empty-state text below h2Describes how to start a recording
Empty hint.empty-state .hintAdditional hint text (e.g., extension requirement)

List View — Recording Cards

ElementSelectorNotes
Recording list.recording-listWraps all cards
Recording card.recording-list .recording-card<button> element; click navigates to /recordings/{id} via navigateToRecordingDetail
Card header.recording-card .recording-headerContains ID and event badge
Recording ID.recording-card .recording-idMonospace font; e.g., rec_1708456789_abc123
Event badge.recording-card .event-badgeText: "{n} events"; right-aligned in header
Card meta.recording-card .recording-metaContains timestamp
Timestamp.recording-card .recording-meta textRelative time: "just now", "5m ago", "2h ago", or absolute date

Detail View — Header & Actions

ElementSelectorNotes
Back button.back-btnText: "Back"; returns to /recordings
Header actions.header-actionsContains Delete, Save as Workflow, Convert with AI
Delete button.header-actions button with text "Delete"Triggers inline confirm UI (NOT native confirm())
Delete confirm text.confirm-textText: "Delete this recording?"; appears inline after clicking Delete
Confirm delete button.btn-dangerText: "Yes, Delete"; executes deletion
Cancel delete button.header-actions .btn-secondary with text "Cancel"Dismisses inline confirm
Save as Workflow button.header-actions .btn-secondary with text "Save as Workflow"Basic YAML conversion; calls convertRecording(id) then navigates to Skills
Convert with AI button.header-actions .btn-primaryText: "Convert with AI"; purple (#7b1fa2); calls convertRecordingWithLLM(id); disabled when !hasApiKey
Converting indicator.convertingText: "Converting..."; replaces action buttons during conversion
Error banner.error-bannerRed background; shown on delete or convert error

Detail View — Meta Section

ElementSelectorNotes
Meta grid.meta-sectionCSS grid layout with Recording ID, Recorded, Events fields
Recording ID.meta-section mono textFull recording ID
Recorded timestamp.meta-sectionFull datetime of recording creation
Event count.meta-sectionTotal number of events in recording

Detail View — Events

ElementSelectorNotes
Events section.events-sectionContainer for event timeline
Events container.events-section .events-containerMonospace font; scrollable
Event item.event-itemOne row per event
Event index.event-item .event-indexText: "#N" (1-based)
Event type label.event-item .event-typeColor-coded; see Event Type Colors table
Event details.event-item .event-detailsType-specific details (url, selector, value, direction, amount)

Event Type Colors

TypeColorHex
navigateBlue#3b82f6
clickGreen#22c55e
inputPurple#a78bfa
scrollAmber#f59e0b
extractPink#ec4899

Detail View — Raw JSON & Not Found

ElementSelectorNotes
Raw section.raw-sectionContains raw JSON header and pre block
Raw JSON pre.raw-section .raw-json<pre> element; max-height 400px; overflow-y auto (scrolls independently)
Not found.not-foundText: "Recording not found."; shown when ID does not match any recording

Data Model

Recording

FieldTypeNotes
idstringRecording identifier (e.g., rec_{timestamp}_{random})
eventsarrayArray of recorded event objects
timestampdatetimeWhen recording was created
eventCountnumberTotal number of events; also available as events.length

Recording Event

FieldTypeNotes
typeenumnavigate, click, input, scroll, extract
urlstringFor navigate events
selectorstringFor click and input events — CSS selector of target element
valuestringFor input events — text entered
directionstringFor scroll events — up, down, left, right
amountnumberFor scroll events — pixel amount

Derived State

State VariableSourceNotes
$recordingStatus.is_recordingWebSocket / storeTrue while a recording session is active
$recordingStatus.event_countWebSocket / storeLive event count during active recording
$mcpStatus.browser_connectedWebSocket / storeTrue when Chrome extension is connected
hasApiKeysettings?.llm?.api_keyDerived in detail view; gates "Convert with AI" button

States

StateTriggerVisual Indicator
Default (with recordings)Page load with saved recordings.recording-list with .recording-card items
LoadingInitial fetch in progress.loading-state "Loading recordings..."
EmptyNo recordings exist.empty-state with red icon + "No Recordings Yet"
Browser disconnected$mcpStatus.browser_connected is false.warning-banner shown; Start Recording button disabled
ErrorAPI or recording error.error-banner with red background
Recording active"Start Recording" clicked.recording-status with .recording-pulse + label; Start replaced by Stop
Detail view — normalRecording ID foundMeta grid + event timeline + raw JSON
Detail view — delete confirm"Delete" clicked (inline).confirm-text + .btn-danger + Cancel replace Delete button
Detail view — convertingConvert button clicked.converting "Converting..." replaces action buttons
Detail view — not foundInvalid recording ID.not-found "Recording not found."

Common Tasks

  1. Start recording: Click .btn-primary "Start Recording" (requires browser connected) → interact in browser → events captured live via WebSocket
  2. Stop recording: Click .btn-stop "Stop" → recording saved → auto-navigates to new recording detail via navigateToRecordingDetail
  3. View recording: Click .recording-card in list → detail view at /recordings/{id}
  4. Delete recording: Detail view → click "Delete" → inline confirm appears (.confirm-text) → click .btn-danger "Yes, Delete"
  5. Cancel delete: After clicking "Delete", click "Cancel" to dismiss inline confirm without deleting
  6. Convert to workflow: Detail view → click "Save as Workflow" → basic YAML workflow created → navigates to Skills
  7. AI-convert to workflow: Detail view → click "Convert with AI" (must have API key) → LLM-optimized workflow → navigates to Skills
  8. Reload list: Click .reload-btn → refreshes recording list from API
  9. Read raw events: Detail view → scroll .raw-section .raw-json pre block (max-height 400px, scrolls independently)

Tips

  • Real-time event counter: While recording, .recording-label shows live event count updated via WebSocket — no page reload needed
  • Color-coded events: Each event type has a distinct color (see Event Type Colors table) for quick visual scanning
  • AI conversion needs API key: "Convert with AI" button is disabled (!hasApiKey) if no LLM provider API key is configured in Settings
  • Relative timestamps: Recording cards show "just now", "5m ago", "2h ago" etc. — refreshes only on page load or Reload button
  • WebSocket on mount: initWebSocket() called on list view mount for live recording status and event count updates
  • Card is a button: .recording-card is a <button> element — use click by ref or CSS selector, not link navigation

Gotchas

  • Browser extension required: .btn-primary Start Recording is disabled (!browserConnected) without the Chrome extension connected — check sidebar "Browser Connected" indicator
  • Delete is inline, NOT native confirm: Clicking "Delete" renders .confirm-text + .btn-danger + Cancel inline in .header-actions — no browser confirm() dialog is used; automatable via snapshot/click
  • Stop navigates automatically: After stopping, the app calls navigateToRecordingDetail(recording.id) — the list view is not shown again until Back is clicked
  • Convert with AI disabled silently: If hasApiKey is false, the .btn-primary button is visually disabled — check Settings → LLM API key before attempting
  • Converting replaces all buttons: While .converting is shown, Delete/Save/Convert buttons are gone — wait for navigation or error before retrying
  • Raw JSON section scrolls independently: .raw-json has max-height: 400px; overflow-y: auto — page scroll does not scroll the JSON block
  • Not found state on bad ID: Navigating to /recordings/bad-id renders .not-found inline — not a separate route or 404 page
  • SPA routing: /recordings and /recordings/{id} return 404 JSON if accessed directly (server-side) — always navigate via the SPA router