Skip to content

Commit fe1d5aa

Browse files
committed
Format
1 parent f30b4d3 commit fe1d5aa

4 files changed

Lines changed: 208 additions & 215 deletions

File tree

ARCHITECTURE.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,16 @@ The goal is to align both parts and use a single source of truth for the state a
4646
**Component Responsibilities**
4747

4848
1. **DevTools Panel**: The user interface shown in browser DevTools.
49-
5049
- Built with Svelte
5150
- Communicates with background script via Chrome extension ports
5251
- Renders and updates based on events from the inspected page
5352

5453
2. **Background Script**: Central coordination script that runs persistently.
55-
5654
- Maintains connections between DevTools panel and proxy
5755
- Routes messages between components
5856
- Handles tab and lifecycle events
5957

6058
3. **Proxy**: Content script injected into the page context.
61-
6259
- Bridges the extension world and page world
6360
- Translates port-based communication to window.postMessage
6461
- Has access to DOM but not page JavaScript context

CLAUDE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Additionally, the extension has page-level features that work without opening De
5252
### Backend Observers
5353

5454
Each feature has a dedicated observer class in `src/page/observers/`:
55+
5556
- `turbo_frame_observer.js` — tracks `<turbo-frame>` elements
5657
- `stimulus_observer.js` — tracks Stimulus controllers
5758
- `turbo_cable_observer.js` — tracks ActionCable subscriptions
@@ -62,6 +63,7 @@ All implement `matchElement()`, `elementMatched()`, `elementUnmatched()`.
6263
### Message Types
6364

6465
All message type constants live in `src/lib/constants.js`. Two directions:
66+
6567
- `BACKEND_TO_PANEL_MESSAGES`: `SET_TURBO_FRAMES`, `SET_STIMULUS_DATA`, `TURBO_EVENT_RECEIVED`, etc.
6668
- `PANEL_TO_BACKEND_MESSAGES`: `HIGHLIGHT_ELEMENT`, `REFRESH_TURBO_FRAME`, `UPDATE_DATA_ATTRIBUTE`, etc.
6769

@@ -84,6 +86,7 @@ $page/ → src/page/
8486
### Svelte 5 Runes
8587

8688
This project uses Svelte 5 rune syntax exclusively — no legacy Svelte 4 patterns:
89+
8790
- `$state()` for reactive variables
8891
- `$props()` for component props
8992
- `$derived()` for computed values

build.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,7 @@ const outputFileNames = {
3737
// Dev-only entry points (excluded from production builds)
3838
const devEntryPoints = ["./src/panel/dev.js"]
3939

40-
const baseEntryPoints = [
41-
"./src/page/content.js",
42-
"./src/popup.js",
43-
"./src/background.js",
44-
"./src/page/inject_script.js",
45-
"./src/panel/panel.js",
46-
"./src/panel/register.js",
47-
"./src/page/backend.js",
48-
"./src/page/proxy.js",
49-
]
40+
const baseEntryPoints = ["./src/page/content.js", "./src/popup.js", "./src/background.js", "./src/page/inject_script.js", "./src/panel/panel.js", "./src/panel/register.js", "./src/page/backend.js", "./src/page/proxy.js"]
5041

5142
const esbuildConfig = {
5243
entryPoints: production ? baseEntryPoints : [...baseEntryPoints, ...devEntryPoints],

0 commit comments

Comments
 (0)