Skip to content

fix(explore): keep the event-pane chevron live on skill pages#126

Merged
jrosskopf merged 1 commit into
mainfrom
fix/panel-reexpand
May 31, 2026
Merged

fix(explore): keep the event-pane chevron live on skill pages#126
jrosskopf merged 1 commit into
mainfrom
fix/panel-reexpand

Conversation

@jrosskopf
Copy link
Copy Markdown
Contributor

Summary

Once the left event pane was collapsed it could not be re-opened on a skill page — the expand chevron was dead. (Instance pages toggled fine, so it looked intermittent.)

Cause. The event pane auto-minimizes on skill pages (skills carry no events), modelled as a derived OR:

effective = leftCollapsed || isSkill   // chevron writes leftCollapsed

On a skill, isSkill is true, so the OR is stuck true regardless of the chevron — clicking expand set leftCollapsed = false, but false || true == true.

Fix. Make leftCollapsedProvider an explicit choice (bool?, null = follow the page-type default) that effective prefers over the skill default, and reset it to null in _SplitBody when the focused page flips skill↔instance. The chevron is now always authoritative for the current page (it can re-open the event pane on a skill), while skills still auto-minimize by default and instances still show events.

Verified live via chrome-devtools on the seeded :8080 gateway: on the customer skill page the auto-minimized event pane now re-opens when the chevron is clicked.

Test plan

  • test/crm/crm_workspace_test.dartnew the event-pane chevron re-opens an auto-minimized skill page: drives the real chevron on a skill page and asserts the pane expands. Verified red under the old OR-logic, green after the fix.
  • test/crm/left_pane_minimize_test.dart: updated for the explicit-choice semantics — skill auto-minimizes by default, an explicit expand wins on a skill, instances default to shown and honour an explicit collapse.
  • test/crm/crm_workspace_test.dart collapsing the left view… still green (override => true is a valid bool?).
  • flutter analyze clean; full suite green (94 tests).
  • docs/notes/discovered/2026-05-31-dead-event-pane-chevron-on-skill.md documents the anti-pattern (user flag OR-ed with a derived condition → control inert where the condition holds).

🤖 Generated with Claude Code

Once collapsed, the left event pane could not be re-opened on a skill
page — the expand chevron was dead. The auto-minimize was modelled as
`effective = leftCollapsed || isSkill`, and the chevron wrote
`leftCollapsed`; on a skill `isSkill` is true, so the OR stayed true no
matter what the chevron wrote (`false || true == true`).

Make `leftCollapsedProvider` an explicit choice (`bool?`, null = follow
the page-type default) that `effective` prefers over the skill default,
and reset it to null in `_SplitBody` when the focused page flips
skill↔instance. The chevron is now always authoritative for the current
page (it can re-open the event pane on a skill), while skills still
auto-minimize by default and instances still show events.

Test: crm_workspace_test `the event-pane chevron re-opens an
auto-minimized skill page` drives the real chevron on a skill page —
verified red under the old OR-logic, green after the fix. Updates
left_pane_minimize_test for the explicit-choice semantics; adds a
discovered-note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jrosskopf jrosskopf merged commit 8c05018 into main May 31, 2026
1 check passed
@jrosskopf jrosskopf deleted the fix/panel-reexpand branch May 31, 2026 04:25
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