Skip to content

Assess and simplify BTW module responsibilities #481

Description

@ladislas

Summary

Assess and simplify BTW module responsibilities. Priority: P3.

Motivation

The roughly 1,500-line entrypoint combines overlay behavior, persistence, imports, and model/session lifecycle work. Size alone does not justify a refactor; assess whether responsibility boundaries are causing concrete change or test friction.

Reviewed source: extensions/btw/index.ts. Revalidate against current main before implementation.

Acceptance Criteria

  • Map the current responsibilities and identify concrete coupling or testing problems before proposing extraction.
  • Choose and implement a small coherent extraction only when it improves ownership or testing; keep the entrypoint as appropriate orchestration.
  • Preserve sidechat persistence per main session, launch-time import semantics, summaries, cancellation, restoration/UI behavior, and model/auth routing.
  • Use lifecycle coverage across the changed boundary and record the architectural rationale and validation, or a reasoned no-change disposition.

Scope and verification

Preserve the extension-per-directory structure and avoid a general extension framework. Current-model display (#124) and task-aware model routing (#390) remain separate features.

Run affected regression coverage and required repository checks for any implementation; update relevant documentation/changelog under repository conventions. Record measurements and decisions durably in this issue or its linked PR.

Type

HITL — requires a policy or design review informed by the investigation before committing to the implementation approach. Investigation can proceed autonomously; publication follows existing authorization rules.

Parent

#466

Blocked by

None — investigation can start immediately; implement after the policy/design review described above.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpac:hitlpac execution: requires human-in-the-loop decisions or approval

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions