Skip to content

fix(ui): reflect status organization in the Folder order controls (OH-46) - #24

Merged
andorcassian merged 3 commits into
devfrom
feature/OH-46-folder-order-status-organization
Nov 4, 2026
Merged

andorcassian merged 3 commits into
devfrom
feature/OH-46-folder-order-status-organization

Conversation

@andorcassian

@andorcassian andorcassian commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

Folder order now reflects status organization, which the earlier OH-46 work did not consider.

  • One rule: resolveSessionListFolderSortControl in sessionListOrderingRules.ts returns the effective mode, any lock, and whether status sorting blocks dragging. The sidebar menu and Session Settings both use it, and they share one lock subtitle helper, so they cannot diverge.
  • Group by Agent or Ticket Status: this view always places folders ahead of sessions, so Mixed had no effect while it stayed enabled and checked. Both choices now lock, Folders first shows as effective, and new copy points to Use saved layout in the Group menu. The saved choice returns afterwards. The projection now holds this at every depth: a folder's subfolders come before its own sessions.
  • Status grouping plus date sorting: the lock names both steps (Use saved layout and Custom order), so clearing one never leaves an unexplained lock.
  • Sort by Agent or Ticket Status: folder positions still apply, so the choice stays selectable. Dragging is off, so Mixed points to Custom order in the sidebar Sort menu, which is what turns status sorting off. In Group by machine, Mixed names both the layout change and the Sort menu step, because machine view never allows dragging.
  • Status sorting without grouping: this follows the OH-71 scope rule merged from dev. A folder's members stay under its header, and loose sessions sort only among the loose slots, so a loose session never lands in a folder's block.
  • No grouping view: the menu describes both choices by section and folder, because this view has no projects. The Settings Mixed subtitle now names No grouping as well.
  • Status mode parsing: SessionListStatusMode and normalizeSessionListStatusMode live in the rules file. Session Settings and the list view state share that parsing.
  • Translations: six new strings and the revised Settings subtitle are translated in all 12 locales.
  • Docs: the OH-46 note in docs/fork-development.md is updated.

Decisions made without a product review:

  • Session Settings keeps its own Session order picker behavior (it does not clear status sorting). The status sorting copy names the sidebar Sort menu instead, which is the control that clears it.
  • List ordering in the saved layout is unchanged. resolveEffectiveSessionListFolderSortMode still orders the source, and the status layer is applied on top of it.

Validation

  • Round 1 RED, before implementation: 10 of 77 tests failed on the original gap or the missing rule API.

  • Review round RED: new tests failed for the intended reason before the fix: nested subfolder order under status grouping, status sorting across a folder boundary, the combined lock in the rule and in Session Settings. The machine view plus status sorting test was proven by temporarily restoring the old subtitle order (it failed, then passed again once restored).

  • GREEN: 102 of 102 tests passed across 8 files (rule, status projection, session folders shell, Session Settings, status menu, repository ordering, web virtualization, i18n.integrity.test.ts), plus 10 of 10 in the status organization settings and organization cache tests.

  • yarn --cwd apps/ui typecheck passed.

  • Merged origin/dev to resolve a conflict with OH-71 in projectSessionListStatusView.ts. Flat status sorting takes OH-71's slot-scoped rule. My earlier test that kept the loose runs on either side of a folder separate now expects OH-71's order, and it still asserts that the folder's member stays under its header. Status grouping keeps folders first at every depth. After the merge: 178 of 178 tests passed across 6 files (projection, rules, session folders shell, Session Settings, web virtualization, i18n.integrity.test.ts), and yarn --cwd apps/ui typecheck passed.

  • Before the merge, hosted CI — Tests passed at 8d7b990 after one rerun of failed jobs. The first attempt failed in two places unrelated to this diff: newSession.resumeId.browseFill.spec.ts (the /new machine selection never navigated; the same failure at the same line appears on another, unrelated PR) and a 1 second vi.waitFor timeout in sync.sessionOrganizationWarmCache.test.ts (it passed 3 of 3 times locally on this head).

  • After the merge, hosted CI — Tests passed at 808d17f after one rerun of failed jobs. The first attempt failed only the same sync.sessionOrganizationWarmCache.test.ts 1 second vi.waitFor timeout (1016ms). That test's shard holds none of this PR's test files, and its import path gains only two pure functions and a type.

  • The Copilot review did not arrive for either head after the PR was marked ready.

Not run:

  • Browser: no ui-e2e spec asserts the Folder order items, and sessionList.statusOrganization.spec.ts has no folders, so it cannot observe the projection change. It was not extended or run here. Hosted CI still owns the existing specs.
  • Full UI suite: not run, per the testing budget.

Scope and deferrals

  • 0.3 port disposition is blocked because the destination checkout is absent.
  • Native QA is deferred, including the ticket's representative folder, session and restart acceptance on macOS.
  • Translations were written by hand and have not had a native-speaker review.

Adjacent issues found and not fixed:

  • Folder order stays enabled when Folder view is off, although no folders are shown. This comes from reading the code and was not run.
  • With status sorting on over a date order, the lock copy says Date sorting even though the Sort menu checks the status sort. The action it suggests is still correct.
  • orderingMode.custom is still English in several locales, while the Folder order copy in those locales uses a translated name.

Tracks OH-46.

…-46)

Group by Agent or Ticket Status always projects folders ahead of loose
rows, yet Mixed stayed enabled and checked there. Status sorting turns
dragging off, yet Mixed still told users to drag.

Decide this once in resolveSessionListFolderSortControl, which feeds the
sidebar menu and Session Settings. Status grouping locks both choices to
effective folders first and the saved choice returns afterwards. Status
sorting keeps the choice but points to Custom order. The flat view and
the Settings subtitle now describe where Mixed applies.
Status grouping now places a folder's subfolders ahead of its own
sessions, so the locked Folders first state holds at every depth. Status
sorting reorders sessions only within one folder's members or one run of
loose sessions, so a loose session never lands under a folder header.

When status grouping and date sorting are both on, the lock names both
steps. In Group by machine with status sorting, Mixed names both the
layout and the Sort menu step. The status sorting copy now points at the
sidebar Sort menu, which is what turns status sorting off, so Session
Settings no longer suggests a choice that is already selected there. The
sidebar menu and Session Settings share one lock subtitle helper.
@andorcassian
andorcassian marked this pull request as ready for review November 4, 2026 18:56
Resolve projectSessionListStatusView against OH-71. Flat status sorting
takes the OH-71 scope rule: each folder's members and the loose rows sort
across their own slots, so saved blocks stay in place. Status grouping
keeps folders first at every depth. The fallback for rows of an unheaded
folder is gone, because OH-71 only keys members by headed folders.
@andorcassian
andorcassian merged commit 14ab23e into dev Nov 4, 2026
84 of 88 checks passed
@andorcassian
andorcassian deleted the feature/OH-46-folder-order-status-organization branch November 4, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant