Skip to content

Availability rules repeated a dozen times, and channel naming split across the Recorder (refactor) #557

Closed

Description

@Skeyelab

Summary

Each feature that ships hidden in Debug or TestFlight has its own copy of the same one-line rule, and channel naming is still half in the Recorder. Nobody sees a difference on screen; this is about making the next change smaller and safer.

Why it matters

Moving a feature up a level is meant to be one line in one place (CLAUDE.md). With about a dozen identical rules it's easy to move the wrong one, and naming changes touch the Recorder each time.

Done when

  • Interface agreed with Eric in a grilling session first.
  • Every availability rule names one of the three levels (Debug only, Debug + TestFlight, everyone) from one shared place, with one table test.
  • Saved names, mid-Take renames and re-patches live in the channel naming module, and the Recorder only calls it.
  • Existing tests pass, or are replaced by tests through the new interface.

Details

Rating: Speculative (architecture review of 2026-10-13).

Availability rules. The same body, isDebugBuild || environment == .sandbox, is repeated in: AutoGainAvailability, ClipProtectionSetting.isOffered (ClipProtection.swift:332), DemoMixerFamilyAvailability, DemoSignalAvailability, DeviceTakeDeleteAvailability, DriveOnlyAvailability, HoldToStopAvailability, MarkerButtonAvailability, NoSignalWarningAvailability, RecordToAvailability (RecordTo.swift:76), with AsyncStopAvailability documented the same way. DriveSpeedTestAvailability is Debug only. Several also copy the #if DEBUG / isAvailableInThisBuild block.

One-line deciders that fail the deletion test: AutoGainAvailability.isOffered in AutoGainOffer.swift (available && mixerLinkOffered), still called from MixerGain.swift:88 after #554.

Channel naming. #443 left it half-moved. The Recorder (1,497 lines) still holds setChannelName, copyChannelNamesFromLastShow, updateChannelName and clearChannelName (Recorder.swift:462-500), loads and saves SavedChannelNames itself (lines 189, 468-469, 482-484), and tracks Mixer names mid-Take in three places: Recorder.logRoutingChanges (line 808), ChannelNaming.mixerOffered (ChannelNaming.swift:109) and TakeSession.logRoutingChange (TakeSession.swift:230).

Leftover names from #442: GainControl and GainStep are declared in X32Gain.swift:133-158, and the X Air uses X32Values.

Direction. One availability-level module that every feature names, matching the CLAUDE.md rule; ChannelNaming owns saved names, mid-Take renames and re-patches. Don't propose the interface here; settle it in a grilling session first.

Related: #554 (Mixer gain, done) and #550 (Copies of a Take, done) absorbed nothing from this one.

Verified on main 2026-10-21 at 2e43ca8

Activity

  1. added this to the Code health milestone on Oct 13, 2026
  2. changed the title [-]Fold the one-line deciders into availability levels; finish moving channel naming out of Recorder (Speculative)[/-] [+]Availability rules repeated a dozen times, and channel naming split across the Recorder (refactor)[/+] on Oct 21, 2026
  3. Skeyelab commented on Oct 27, 2026

    @Skeyelab
    MemberAuthor

    This was generated by AI during triage.

    Triage: in progress

    The interface was agreed with Eric on 2026-10-26. Part 1 (availability levels) merged as #960. Part 2 (channel naming) is #963, waiting on Eric's approval. Close this when #963 merges.

  4. Skeyelab commented on Oct 27, 2026

    @Skeyelab
    MemberAuthor

    This was generated by AI during triage.

    Done: #960 added one AvailabilityLevel table (part 1), and #963 gave ChannelNaming the saved names plus the mid-Take renames and re-patches (part 2). Both are on main. Mid-Take behavior is covered by tests and builds only; Eric's device Takes on the next TestFlight build will show it in use.

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 requestready-for-agentFully specified; an agent can pick this up

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions