Skip to content

Move fork logic out of upstream files near their line limits #45

Open

Description

@kiwidream

The 2026-10-22 sync (#38) had 94 conflicts. Apart from three, every one was in an upstream file the fork had edited inline, and a dozen more files broke max-lines after a clean auto-merge. Move existing fork logic out of upstream files so the next syncs cost less (see the new "Keeping the conflict surface small" policy in the fork-maintenance skill, SwapLabsInc/SwapLabs#217).

These upstream files hold fork lines and sit at or near their 300-line limit after #38, so the next upstream edit there will likely conflict or break lint:

Also:

  • GeneralUpdateSettingsSection.tsx carries the fork's restructured row inline: 474 changed lines against upstream. Consider a fork-owned component that upstream's section renders.
  • Prefer upstream extension points over fork methods inside upstream classes. In sync: upstream ec5eaf96c1 into swaplabs/main #38 the fork's materializePendingMobileSessionTerminal collided with a new upstream method of the same name.

Activity

  1. kiwidream commented on Oct 26, 2026

    @kiwidream
    Author

    From the 2026-10-26 sync (#58): four upstream files went over max-lines because of fork lines, and the fork's lines moved into fork-owned modules:

  2. kiwidream commented on Oct 28, 2026

    @kiwidream
    Author

    From the 2026-10-28 sync (#64): src/main/agent-hooks/server/server-ingest-remote.ts reached 305 counted lines, and upstream's own copy is now at exactly 300 (stablyai#34724), so it can take no fork lines. #30's 5 lines moved out:

    • the relay's user-ended notice is read where payload validation drops it (return this.retireRelayUserEndedSession(...) in place of upstream's bare return), since its payload state is one no host admits;
    • reportsUserEndedSessions is stamped by the fork-owned withRelayUserEndedSessionReports in server-terminal-loss-resume.ts, which wraps the event literal.

    The file is now at 299, with 4 changed upstream lines and no added ones. wsl-relay-user-ended-session.test.ts and server-terminal-loss-presence.test.ts fail when either piece is removed.

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 request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions