Commit Graph

53 Commits

Author SHA1 Message Date
Tommy D. Rossi fdb19c5736 increase table cell contrast in light mode (muted opacity 0.35 -> 0.5) 2026-02-20 13:04:05 +01:00
Tommy D. Rossi a7ab6708ef fix code block bleed alignment and line numbers
- Fixed --ll-bleed to 44px (8px padding + 36px line-number width, border-box)
- Line numbers fixed width 36px (always fits 3 digits, no layout shift)
- Line number opacity increased from 0.15 to 0.3 in both light and dark mode
- Commented out code block background
2026-02-20 12:57:41 +01:00
Tommy D. Rossi acd63a9235 liveline: add Link component, OL, remove BackButton, dedent code blocks, spacing tweaks
- Add A (link) component with --ll-accent color, bright #58a6ff in dark mode
- Add OL (ordered list) component for numbered steps
- Remove BackButton from EditorialPage
- Use string-dedent for all CodeBlock strings, properly indented in source
- Getting started steps as OL with clickable Chrome Web Store link
- Star on GitHub link in intro paragraph
- Inline heading rule (flex + 1px line) replaces separate Divider
- Heading padding 24px top/bottom, article gap 32px
- Sidebar TOC item spacing increased to 5px
- Centered image captions
2026-02-20 12:53:21 +01:00
Tommy D. Rossi abd28162aa liveline: inline heading rule, restore diagram, increase spacing
- SectionHeading now renders as flex row with hairline rule extending
  to fill remaining width after the heading text (matching benji.org)
- Removed separate Divider from Section component
- Restored original diagram layout from before refactor
- Increased article gap to 32px, heading padding to 24px top/bottom
- Centered image captions
2026-02-20 12:43:06 +01:00
Tommy D. Rossi 984f41cfbe extract editorial components to markdown.tsx, simplify liveline to content-only
- New website/src/components/markdown.tsx with all reusable components:
  EditorialPage, TableOfContents, BackButton, P, Code, Caption, CodeBlock,
  ChartPlaceholder, Section, Divider, SectionHeading, List, Li, PropsTable
- liveline.tsx reduced from ~988 to ~370 lines, now pure content
- Renamed Paragraph->P, InlineCode->Code for brevity
- TOC accepts items/logo props for reuse across pages
- Centered image captions
- Divider with equal top/bottom padding
- Variable spacing CSS rules for code blocks, images, section dividers
2026-02-20 12:38:54 +01:00
Tommy D. Rossi 23da0767e9 fix diagram 2026-02-20 12:29:07 +01:00
Tommy D. Rossi 4079b2ac84 Update package.json 2026-02-20 12:26:00 +01:00
Tommy D. Rossi d338dba8c0 Update globals.css 2026-02-20 12:25:55 +01:00
Tommy D. Rossi 7fe09ea35e liveline: JetBrainsMono Nerd Font Mono for code blocks, fix diagram alignment
- Add @font-face for JetBrainsMono Nerd Font Mono (nerd-fonts v3.3.0) with
  proper box-drawing glyph support for seamless Unicode diagram rendering
- Update --ll-font-code to use NF Mono as primary, fallback to JetBrains Mono/SF Mono
- Fix liveline-prism.css: use var(--ll-font-code) instead of hardcoded SF Mono
- Remove unused Google Fonts JetBrains Mono link from root.tsx
- Fix diagram: keep Unicode box chars for seamless lines, use ASCII < > v for
  arrows (◄ ► ▼ render at inconsistent widths), recount all columns
2026-02-20 12:25:32 +01:00
Tommy D. Rossi 8511d17ed7 liveline: match benji.org inline code style with ::before background pill
Inline code now uses a subtle rgba(0,0,0,0.04) background pill via a ::before
pseudo-element with absolute inset and 4px border-radius, matching
benji.org/liveline exactly. Dark mode uses rgba(255,255,255,0.08).
Moved styles from inline to CSS class .ll-inline-code.
2026-02-20 11:52:07 +01:00
Tommy D. Rossi 1fb714a247 liveline: bold playwriter logo in sidebar, remove header text, remove image border-radius
- Replace arrow + 'Index' link with bold 'playwriter' logo text in TOC sidebar
- Remove 'Playwriter' subtitle and '2025' year from page header, start with first paragraph
- Remove rounded-lg from chart placeholder images for sharp edges
2026-02-20 11:21:03 +01:00
Tommy D. Rossi a71cc88336 refactor: replace .dark CSS selectors with @variant dark for strategy-agnostic dark mode
Replace all hardcoded .dark class selectors with Tailwind v4's @variant dark
directive, which compiles to whatever strategy is configured in
@custom-variant dark. This means changing the dark mode strategy
(class, prefers-color-scheme, data-attribute, or combined) only requires
updating one line in globals.css — all dark mode variable overrides
and token styles follow automatically.

Changes:
- globals.css: update @custom-variant to (&:where(.dark, .dark *)) to
  include the .dark element itself with zero specificity, replace
  .dark {} block with @variant dark {}
- liveline.css: replace .dark .liveline-page {} with
  @variant dark { .liveline-page {} }
- liveline-prism.css: replace 20+ .dark .token.* rules with a single
  @variant dark {} block
2026-02-20 11:05:09 +01:00
Tommy D. Rossi d562047618 add bleed to code blocks and images on liveline page
Code blocks and chart placeholders now extend 36px beyond the 550px prose
column on each side via negative margins (.ll-bleed class). This aligns the
code text (after line numbers) flush with the prose left edge.

- --ll-bleed: 36px CSS variable (8px div padding + 28px line-number span)
- Responsive: bleed disabled below 650px viewport
- overflow-x-hidden on page wrapper prevents horizontal scroll
2026-02-20 11:00:01 +01:00
Tommy D. Rossi 4dad886f14 add dark mode to website using prefers-color-scheme + .dark class
Inline script in <head> applies .dark class on <html> based on OS preference
and listens for live changes. All liveline page colors now use CSS variables
with dark overrides in .dark .liveline-page block.

- liveline.css: new vars (--ll-text-muted, --ll-text-hover, --ll-divider,
  --ll-code-line-nr, --ll-btn-bg/shadow, --ll-fade-*) + full dark overrides
- liveline-prism.css: GitHub Dark syntax highlighting theme under .dark
- liveline.tsx: ~30 hardcoded rgba/hex colors replaced with CSS vars
- root.tsx: anti-FOUC script toggling .dark from prefers-color-scheme
2026-02-19 18:02:07 +01:00
Tommy D. Rossi 35c885b199 rewrite liveline page to Playwriter content, update skill docs, add OG image
liveline.tsx: replace Liveline chart library content with Playwriter product page.
Sections now cover getting started, architecture, snapshots, visual labels,
sessions, debugger/editor, network interception, screen recording, comparison
tables, remote access, and security.

skill.md: clarify page reuse rules (reusing about:blank is fine), fix download
path to /tmp instead of ./ for cross-platform safety.

Add og-errore-vs-effect.png for errore comparison page.
2026-02-19 17:43:23 +01:00
Tommy D. Rossi 5a3acd9cb8 refactor liveline: extract Section, List, Li components
Simplifies article content by extracting repeated patterns into
reusable components:
- Section: wraps Divider + SectionHeading + children
- List: styled ul with typography inline styles
- Li: styled li with correct padding

Article JSX now reads as clean declarative markup instead of
verbose inline-styled HTML.
2026-02-19 10:04:45 +01:00
Tommy D. Rossi a8481af89b add liveline page: recreation of benji.org/liveline editorial design
Recreates the benji.org/liveline page in the website folder using React,
Tailwind, and the same editorial design system. Charts are replaced with
static SVG placeholders.

Typography:
- Inter variable font from rsms.me (same source as next/font)
- font-weight 475 body, 560 headings, font-optical-sizing: auto
- 14px body, 20px line-height, -0.09px letter-spacing
- Near-black text rgb(17,17,17), 40% opacity secondary
- Display P3 accent colors with @supports fallback

Layout:
- 550px narrow content column, fixed TOC sidebar
- Stagger-in entrance animation with cascading delays
- Fixed header fade gradient (multi-stop white-to-transparent)
- Scroll-spy TOC highlighting via IntersectionObserver

Code blocks:
- Prism.js syntax highlighting with GitHub-light color palette
- Line numbers column with 20px right padding
- 12px / 18px font size

Props tables, dividers, captions, code blocks, bullet lists all
styled to match the original computed values.
2026-02-19 09:56:30 +01:00
Tommy D. Rossi 17fd10b50f skill: fix contradictions, remove duplicates, consolidate advice
Fixes:
- Bug: page.screenshotWithAccessibilityLabels was called as method on page,
  fixed to standalone function call
- Removed duplicate 'debugging playwriter issues' section at end of file
  (identical to the detailed one earlier)
- Softened waitForTimeout rule: short waits (1-2s) now acknowledged as
  acceptable for non-deterministic events like popups/animations
- Fixed download example path from /tmp/ to ./
- Added note that bare 'page' in examples is for brevity, real automation
  should use state.myPage
- Consolidated diff behavior explanation to one place in snapshot section
  (was repeated 3 times with slight inconsistencies)
- Trimmed redundant 'prefer snapshots' advice to reference the dedicated
  'choosing between snapshot methods' section
- Consolidated cmd+click popup advice (was in both mistakes and common
  patterns with duplicate examples)
- Cross-referenced iframe approaches: frameLocator for locator chaining,
  contentFrame for Frame objects needed by snapshot()
- Clarified require is the only option in sandbox (ESM import unavailable)
2026-02-18 22:20:52 +01:00
Tommy D. Rossi 18284efd9f skill: add observe feedback loop and print page URL in every observe step
The observe step now has an inner loop — if the page isn't ready (still
loading, wrong URL, expected content missing), the agent loops back to
observe again instead of acting on stale state. The ASCII diagram shows
the 'not ready' branch looping back to observe.

Every observe step in the example now prints page.url() before the
snapshot so the agent always knows the current URL. This catches
redirects and unexpected navigation between actions.
2026-02-18 18:14:37 +01:00
Tommy D. Rossi 7ed17d264f skill: add computer use section mapping Anthropic/Claude extension actions to Playwright equivalents
Add a 'computer use' section to skill.md showing how Playwriter covers all
actions from the Anthropic computer_20250124 tool and the Claude Chrome
extension's custom computer tool, using Playwright APIs instead of
screenshot-based coordinate clicking.

Each subsection shows the declarative locator-based approach first (preferred)
with coordinate-based fallback for canvas/maps/custom widgets.

Also adds docs/claude-extension-tools.json with all 16 tool schemas extracted
from the Claude Chrome extension v1.0.39 (minified source) for reference.
2026-02-18 00:44:44 +01:00
Tommy D. Rossi 9008920c95 skill: add interaction feedback loop and reuse about:blank tabs
Add observe → act → observe feedback loop section with ASCII diagram
and Framer command palette example. Agents must take a snapshot after
every action to verify the result before proceeding.

Also change page creation pattern to reuse existing about:blank tabs
instead of always creating new ones, with a note to navigate immediately
in the same execute call to prevent concurrent agents from grabbing the
same tab.
2026-02-17 15:53:25 +01:00
Morse 387149c649 docs: add Chrome launch commands to skill.md for when browser is closed
When the Playwriter extension can't connect because Chrome isn't running,
agents now have platform-specific commands (macOS, Linux, Windows) to start
Chrome from the CLI. Also documents the --allowlisted-extension-id and
--auto-accept-this-tab-capture flags for enabling automatic tab capture
for screen recording without manual extension clicks.

Closes #48
2026-02-16 14:44:12 +01:00
Tommy D. Rossi 87188423b1 feat: reuse Playwright's internal CDP session instead of creating new WebSocket connections
Switch from getCDPSessionForPage (creates a new WS via Target.attachToTarget)
to getExistingCDPSessionForPage which reuses Playwright's internal CRSession.
This is critical for the relay server where Target.attachToTarget is intercepted
and cannot create real new sessions.

Also add FrameLocator support in accessibilitySnapshot — FrameLocator (from
locator.contentFrame()) is now auto-resolved to the real Frame object needed
for OOPIF CDP session attachment.

- New PlaywrightCDPSessionAdapter wrapping Playwright's CDPSession as ICDPSession
- New getExistingCDPSessionForPage() using context.getExistingCDPSession()
- resolveFrame() helper converts FrameLocator to Frame via elementHandle().contentFrame()
- getAriaSnapshot() frame param now accepts Frame | FrameLocator
- Executor CDP cache uses ICDPSession, borrowed sessions detach as no-op
- Test for getExistingCDPSession through the relay
- Updated framer iframe guide with alternative page.frames() example
- Bump playwright submodule to @xmorse/playwright-core@1.59.2
- Fix styles-api.md import path
2026-02-06 18:03:26 +01:00
Tommy D. Rossi d6adb460d5 fix: move log dir from /tmp/playwriter to ~/.playwriter (fixes #44) 2026-02-06 10:44:28 +01:00
Tommy D. Rossi dfe9738a00 Update SKILL.md 2026-02-04 22:05:28 +01:00
Tommy D. Rossi a718299b73 feat: add well-known skills discovery endpoint 2026-02-04 19:20:33 +01:00
Tommy D. Rossi 6a139c3595 Update SKILL.md 2026-02-03 12:05:41 +01:00
Tommy D. Rossi 3f2063f999 Update SKILL.md 2026-02-03 11:44:45 +01:00
Tommy D. Rossi 0341705677 docs: refresh generated skill output 2026-02-02 22:13:34 +01:00
Tommy D. Rossi 51704a0922 feat: add getPageMarkdown utility using Mozilla Readability
- Consolidate build scripts into single build-client-bundles.ts
- Add @mozilla/readability for Firefox Reader View content extraction
- New getPageMarkdown() utility extracts main page content as plain text
- Supports search and diff-since-last-call like other utilities
- Add test with file snapshot
2026-02-01 18:44:45 +01:00
Tommy D. Rossi 8532de46fc feat: improve HTML rewriting - remove decorative subtrees and aria-hidden elements
- Add removeAriaHiddenPlugin to strip aria-hidden=true subtrees
- Add removeEmptyAltImagesPlugin to remove decorative images
- Add removeDecorativeSubtreesPlugin to prune content-free branches
- Update test snapshots for x.com
2026-02-01 17:09:07 +01:00
Tommy D. Rossi 1732e4e232 Update SKILL.md 2026-01-29 20:23:57 +01:00
Tommy D. Rossi 7809be6328 docs(skill): instruct agents to create own pages and handle closures 2026-01-27 19:06:06 +01:00
Tommy D. Rossi 6de954ca1a Update SKILL.md 2026-01-27 13:35:23 +01:00
Tommy D. Rossi 170ac7c87f Update SKILL.md 2026-01-27 13:35:23 +01:00
Tommy D. Rossi c9768965b5 Update .gitignore 2026-01-27 13:35:22 +01:00
Tommy D. Rossi 6b0b9d3bf4 about jq and cdp logfile 2026-01-26 13:44:41 +01:00
Tommy D. Rossi 393d23e1e2 Delete docker.package.json 2026-01-25 16:18:47 +01:00
Tommy D. Rossi 45cdc372a8 refactor: move SKILL.md to src, add playwriter skill command
- Move skills/playwriter/SKILL.md to playwriter/src/skill.md (source of truth)
- Add 'playwriter skill' CLI command to output full docs
- Make skills/playwriter/SKILL.md a lightweight stub pointing to CLI
- Generate prompt.md to dist/ instead of src/
- Strip CLI-only content from MCP prompt
2026-01-25 16:18:23 +01:00
Tommy D. Rossi b7edfb52b1 refactor: make SKILL.md source of truth, generate prompt.md from it 2026-01-24 12:21:22 +01:00
Tommy D. Rossi f9869a59f2 refactor: move welcome.html to src/, simplify vite build config, cleanup cli.ts formatting 2026-01-23 23:57:25 +01:00
Tommy D. Rossi 18d0cdb646 Add prompt.md to website public and link in CLI help 2026-01-22 22:06:29 +01:00
Tommy D. Rossi c15cf5947a Add unified mcpLog for relay server and stderr logging 2025-12-31 22:41:32 +01:00
Tommy D. Rossi 6753e1953f Update vite.config.ts 2025-12-30 17:45:45 +01:00
Tommy D. Rossi 2890d82470 Update package.json 2025-12-30 17:45:37 +01:00
Tommy D. Rossi d37b2eee92 vercel react router 2025-12-30 17:44:41 +01:00
Tommy D. Rossi c97a6123b2 Update package.json 2025-12-30 17:43:01 +01:00
Tommy D. Rossi e7b4f07dd4 fix website 2025-12-30 17:41:44 +01:00
Tommy D. Rossi 45ca51bc35 Update _index.tsx 2025-12-30 17:39:52 +01:00
Tommy D. Rossi e4e509d638 Update react-router.config.ts 2025-12-30 14:35:40 +01:00