Skip to content

Split TasksDesktopState and TasksPane by responsibility #744

Open

Description

@JSdotNet

TasksDesktopState is one class of 4,005 lines and 131 members that owns debounce timers, GitHub push, Copilot launch, save-state settling and My Day arithmetic. TasksPane.razor is 3,721 lines beside it. Found in the 2026-09-27 repository review.

Context

  • src/Modules/Tasks/Backlog.Modules.Tasks.UI/TasksDesktopState.cs. The GitHub and Copilot halves around lines 2400 to 2600 split off cleanly; the debounce timers (lines 63 to 73, 121, 2672) are also the subject of Drive the Tasks debounce and DebouncedSave timers with TimeProvider so tests stop sleeping #726 and should move with their owner.
  • src/Modules/Tasks/Backlog.Modules.Tasks.UI/TasksPane.razor. Line 3220 catches every exception around JS.InvokeAsync<bool>("backlogFocusOutside", ...); narrow it to catch (Exception ex) when (ex is JSException or JSDisconnectedException), the shape Inbox.razor line 367 uses.
  • Legitimately large siblings (TaskListView.razor, TaskItem.razor, about 2,000 lines each) are single rich components and are not in scope.
  1. Extract TasksGitHubPush, TasksCopilotLaunch, TasksSaveSettling and MyDayPlanning (names indicative) from TasksDesktopState, each with its own tests moved from tests/Backlog.Desktop.UI.UnitTests and tests/Backlog.Modules.Tasks.UnitTests.
  2. Move the corresponding @code regions and markup out of TasksPane.razor into child components under src/Modules/Tasks/Backlog.Modules.Tasks.UI/Pane/.
  3. Narrow the JS interop catch.

Land after #726 so the timer code moves once. Route through delivery:flow-code per CLAUDE.md.

Activity

  1. added
    enhancementNew feature or request
    triagedClassified by the issue sweep
    in-progressA worker session is actively working this issue
    on Sep 27, 2026
  2. self-assigned this
    on Oct 3, 2026
  3. JSdotNet commented on Oct 3, 2026

    @JSdotNet
    OwnerAuthor

    The issue sweep (2026-10-03) did not complete this issue. Outcome: red, stopped at Review.

    • The split was implemented: TasksGitHubPush, TasksCopilotLaunch, TasksSaveSettling and MyDayPlanning were extracted, and TasksDesktopState went from 5,351 to 3,975 lines. The Pane/ child components were added and the backlogFocusOutside catch was narrowed.
    • The full-suite run had one failure: HomeDevbookPaneTests.Pressing_an_entry_s_devbook_reference_opens_it_in_the_devbook_pane. It timed out on .file-view__path. That file is outside the diff, and the test project passed 3,518/3,518 when re-run alone, so it looks flaky.
    • The review found one open blocker. The save-state toast markup (around TasksPane.razor:2287) was not moved into Pane/, so TasksPane.razor shrank by only about 2%.

    The work is kept as an unpushed local commit, 55855f30, on branch schedule/issue-sweep/2026-10-03/744-split-tasks-state in the owner's checkout. Remove sweep-failed to let a later sweep retry.

  4. added
    sweep-failedThe issue sweep could not complete this issue; clear to retry
    and removed
    in-progressA worker session is actively working this issue
    on Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestsweep-failedThe issue sweep could not complete this issue; clear to retrytriagedClassified by the issue sweep

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions