Skip to content

feat(extension): content script parser + session manager (Week 2 AC 2+3)#8

Merged
BODMAT merged 4 commits into
developmentfrom
feature/extension-content-sessions
May 21, 2026
Merged

feat(extension): content script parser + session manager (Week 2 AC 2+3)#8
BODMAT merged 4 commits into
developmentfrom
feature/extension-content-sessions

Conversation

@BODMAT

@BODMAT BODMAT commented May 21, 2026

Copy link
Copy Markdown
Owner

Implements page metadata collection and session lifecycle management in the extension.

What's included

AC 2 — Content Script

  • Parses url, title, metaDescription, headings (h1–h3) from active page
  • Fires on page load + SPA navigation (popstate, hashchange)
  • Sends PAGE_METADATA to service worker; ignored if no active session

AC 3 — Session Manager

  • startSession / stopSession with chrome.storage.local persistence
  • Timer derived from startedAt + totalActiveMs — safe after SW restart
  • Message handlers: SESSION_START, SESSION_STOP, SESSION_GET_STATE
  • pendingEvents accumulation in storage (consumed by AC 5)

Gaps identified (documented in plan, resolved in AC 4/5)

  • SESSION_PAUSE / SESSION_RESUME missing → added in AC 4
  • No POST /api/v1/sessions endpoint → added in AC 5
  • Notes from popup stored as Event with tags: ["note"]
  • Event.content format defined: [metaDescription, ...headings].join(" | ")

Closes Week 2 AC 2, AC 3

@vercel

vercel Bot commented May 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worktrace Ready Ready Preview, Comment May 21, 2026 9:22pm

@BODMAT BODMAT merged commit 0cfaf7c into development May 21, 2026
4 checks passed
@BODMAT BODMAT deleted the feature/extension-content-sessions branch May 21, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant