Skip to content

refactor: extract conference provider interface for Meet and Teams#9

Merged
odsod merged 2 commits into
mainfrom
conference-providers
May 24, 2026
Merged

refactor: extract conference provider interface for Meet and Teams#9
odsod merged 2 commits into
mainfrom
conference-providers

Conversation

@odsod

@odsod odsod commented May 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Extracts platform-specific DOM knowledge (JS expressions, JSON parsing) from internal/speaker/ into internal/conference/{meet,teams} packages
  • Introduces conference.Provider interface with 6 methods: Name, MatchesURL, SnapshotExpression, ParseSnapshot, PollExpression, ParsePoll
  • Speaker detector becomes a pure orchestrator consuming injected providers via DI
  • CSS class validation moves into each provider's PollExpression method
  • Adding new platforms (Zoom, Webex) now only requires implementing the Provider interface
  • Enables revive exported lint rule and adds godoc comments across internal packages

Test plan

  • mise run build passes (lint, test, tidy, diff)
  • 95% coverage on meet/teams providers (pure JSON parsing tests)
  • 93% coverage on detector state machine (mock provider + mock CDP)
  • Compile-time interface compliance check (var _ signals.SpeakerPoller = (*speaker.Detector)(nil))

odsod added 2 commits May 24, 2026 08:46
Separate platform-specific DOM knowledge (JS expressions, JSON parsing)
from the speaker detection state machine (CSS class discovery, cached polling).

- `internal/conference/` defines `Provider` interface with 6 methods
- `internal/conference/meet/` implements Meet-specific extraction
- `internal/conference/teams/` implements Teams-specific extraction
- Detector becomes a pure orchestrator consuming injected providers
- CSS class validation moves into each provider's PollExpression
- 95% test coverage on providers, 93% on detector state machine
- Enable revive exported lint with stutter and private-receiver checks
- Add godoc to exported symbols across internal packages
- Rename config.ConfigDir → config.Dir and segment.SegmentHandler → segment.Handler
@odsod odsod merged commit 4bed73d into main May 24, 2026
1 check passed
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