Skip to content

[Story] Split the oversized server, collaboration and broadcast modules #39

Done

Description

@aMonteSl

As a developer working on servers and collaboration,
I want the 700–1,200-line server modules split by responsibility,
so that each file has one reason to change and can be tested on its own.

Scope (ROADMAP W5-20..W5-36, with §E overrides)

  • HTTP/HTTPS lifecycle characterization, then an HTTPS base for TLS options and URL building (getConfig stays per class); one deadlock-rationale comment; dispose-before-close order in HttpServer.stop() untouched (W5-20..22).
  • attachWebSocketEndpoint and DEFAULT_ROOM_ID (W5-23).
  • collaborationRoomServer.ts (1,174 lines) in three steps: types and pure helpers, participant identity, room registry (W5-24..26).
  • screenBroadcastSignalingServer.ts (781): mediaFrame.ts, then relay policy (W5-27..28).
  • multiServerLauncher.ts (677): launcher characterization harness; factory, notifications outside runtime/, conflict dialog — this also removes the runtime → UI import found in the host-boundary analysis (W5-29..32).
  • handleServerActions.ts (815): harness, then format module and remote/participants module (catalogue keyed on action stays 1.3.0) (W5-33..36).

Acceptance criteria

  • Largest file 1,175 → ≤ 700 lines; files over 600 lines ≤ 4, each named and justified.
  • HTTPS pair identical lines 162 → ≤ 30.
  • Characterization transcripts identical before and after; both WebSocket suites green; manual F5 check of HTTPS server, collaboration room (join, avatar, kick) and screen share recorded.

Activity

  1. self-assigned this
    on Nov 25, 2026
  2. added
    tfm
    user-story
    on Nov 25, 2026
  3. aMonteSl commented on Nov 25, 2026

    @aMonteSl
    CollaboratorAuthor

    Done in #54, merged into v1.2.1 with CI green on Linux, macOS and Windows. Largest server module 1,174 → 619 lines; HTTPS pair identical lines 156 → 26. W5-36 deferred to 1.3.0 per §E. Open point carried to #43: six files are still over 600 lines (five outside this story's scope), each justified in .claude/docs/v1.2.1/sessions/39-server-splits.md and to be re-measured after #34/#35/#40.


    Generated by Claude Code

  4. added
    area: extension
    stream: cleanup-refactor
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: extensionstream: cleanup-refactortfmuser-story

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions