From 8163c5d0148d99cf0f324d768ec383cd9a56966d Mon Sep 17 00:00:00 2001 From: robbond Date: Thu, 20 Aug 2026 06:15:44 +0100 Subject: [PATCH] test(ui): clarify branch provenance and hierarchy --- components/experimental/branch-switcher.jsx | 22 +++++++++++------ components/investigation-map.jsx | 4 ++-- components/investigation-summary-panel-v2.jsx | 8 +++---- components/investigation-summary-panel-v3.jsx | 10 ++++---- components/investigation-summary-panel.jsx | 2 +- components/reasoning-workspace.jsx | 24 +++++++++---------- components/scenario-form.jsx | 12 ++++++++-- 7 files changed, 49 insertions(+), 33 deletions(-) diff --git a/components/experimental/branch-switcher.jsx b/components/experimental/branch-switcher.jsx index b7457ca..2abd32e 100644 --- a/components/experimental/branch-switcher.jsx +++ b/components/experimental/branch-switcher.jsx @@ -46,7 +46,7 @@ function NewIndicator({ visible }) { /* ── Single branch row ─────────────────────────────────── */ -function BranchRow({ id, label, active, isNew, onClick }) { +function BranchRow({ id, label, active, isNew, origin, onClick }) { const isActive = Boolean(active); return ( @@ -54,7 +54,7 @@ function BranchRow({ id, label, active, isNew, onClick }) { onClick={onClick} disabled={isActive} aria-current={isActive ? "page" : undefined} - className={`w-full flex items-center gap-2 rounded-md px-3 py-2 text-left transition text-sm ${ + className={`w-full flex items-start gap-2 rounded-md px-3 py-2 text-left transition text-sm ${ isActive ? "bg-blue-50/80 border border-blue-200/60 text-blue-900 font-medium" : "text-gray-600 hover:bg-gray-100/70 hover:text-gray-800 border border-transparent" @@ -70,8 +70,15 @@ function BranchRow({ id, label, active, isNew, onClick }) { {isActive ? "●" : "○"} - {/* Branch label */} - {label} + {/* Branch label + origin */} + + {label} + {origin && ( + + {origin} + + )} + {/* Passive new-result indicator (only for inactive branches) */} {!isActive && } @@ -96,11 +103,11 @@ export default function ExperimentalBranchSwitcher({ aria-label="Experimental branch switcher — RTO.25A" > {/* Label — clearly experimental */} -

+

Branches{" "} - (exp) + (exp)

-

+

Browse branches. Current focus is preserved.

@@ -112,6 +119,7 @@ export default function ExperimentalBranchSwitcher({ label={branch.label} active={activeBranchId === branch.id} isNew={Boolean(branchNewResults[branch.id])} + origin={branch.origin} onClick={() => onBranchSelect?.(branch.id)} /> ))} diff --git a/components/investigation-map.jsx b/components/investigation-map.jsx index 703bb42..2f2d5f0 100644 --- a/components/investigation-map.jsx +++ b/components/investigation-map.jsx @@ -84,10 +84,10 @@ export default function InvestigationMap({ turnCount = 0 }) { return (
-

+

Investigation Map

-

+

Active investigation topics and their status.

diff --git a/components/investigation-summary-panel-v2.jsx b/components/investigation-summary-panel-v2.jsx index 997a8f5..2efd865 100644 --- a/components/investigation-summary-panel-v2.jsx +++ b/components/investigation-summary-panel-v2.jsx @@ -196,7 +196,7 @@ function InvestigationSummaryPanelV2({ graph, selectedQuestion, result, updateSt
{stillInvestigating.length > 1 ? ( <> -

Still investigating

+

Still investigating

    {Object.entries(investigatingByGroup).map(([group, items]) => (
  • @@ -227,7 +227,7 @@ function InvestigationSummaryPanelV2({ graph, selectedQuestion, result, updateSt {/* ── What we have learned ────────────────────────── */} {known.length > 0 && (
    -

    What we know

    +

    What we know

      {known.map((item, i) => (
    • @@ -243,8 +243,8 @@ function InvestigationSummaryPanelV2({ graph, selectedQuestion, result, updateSt {/* ── Quiet reasoning summary — secondary ─────────── */}
      -

      Reasoning

      -
      +

      Reasoning

      +
      {reasonEntries.map(([label, count]) => ( {count} {label} diff --git a/components/investigation-summary-panel-v3.jsx b/components/investigation-summary-panel-v3.jsx index 32b3eb0..a233a7a 100644 --- a/components/investigation-summary-panel-v3.jsx +++ b/components/investigation-summary-panel-v3.jsx @@ -47,7 +47,7 @@ function KnownSection({ title, items }) { return (
      -

      +

      {title}

        @@ -67,7 +67,7 @@ function InvestigatingSection({ title, items }) { return (
        -

        +

        {title}

          @@ -87,7 +87,7 @@ function ExplanationSection({ items }) { return (
          -

          +

          Possible explanations

            @@ -102,10 +102,10 @@ function QuietSummary({ text }) { return (
            -

            +

            Investigation state

            -

            {text}

            +

            {text}

            ); } diff --git a/components/investigation-summary-panel.jsx b/components/investigation-summary-panel.jsx index 2b2b073..63edf38 100644 --- a/components/investigation-summary-panel.jsx +++ b/components/investigation-summary-panel.jsx @@ -127,7 +127,7 @@ function InvestigationSummaryPanel({ graph, selectedQuestion, result, updateStat {/* Current understanding */} {currentUnderstanding && (
            -

            +

            What we understand so far

            {currentUnderstanding}

            diff --git a/components/reasoning-workspace.jsx b/components/reasoning-workspace.jsx index dea5df4..7c27bc7 100644 --- a/components/reasoning-workspace.jsx +++ b/components/reasoning-workspace.jsx @@ -320,7 +320,7 @@ function CurrentUnderstandingCard({ currentSummary, plainLanguage }) { return (
            -

            +

            Understanding

            {summary}

            @@ -334,7 +334,7 @@ function PlainLanguageCard({ summary }) { return (
            -

            +

            Understanding

            {summary}

            @@ -382,7 +382,7 @@ function InvestigationHistory({ turns }) { return (
            -

            +

            History

            @@ -402,7 +402,7 @@ function OriginalSituation({ scenario, centralStatement }) { return (
            -

            +

            Situation

            @@ -832,7 +832,7 @@ export default function ReasoningWorkspace({ return (
            -

            +

            In this branch — Open questions

            @@ -894,7 +894,7 @@ export default function ReasoningWorkspace({ {/* Formulated question */} {focused?.question?.trim() ? (
            -

            +

            Question

            @@ -944,7 +944,7 @@ export default function ReasoningWorkspace({ {focused?.result && ( <>

            -

            +

            What we learned

              @@ -955,7 +955,7 @@ export default function ReasoningWorkspace({
            -

            +

            Still unclear

              @@ -967,7 +967,7 @@ export default function ReasoningWorkspace({ {focused.result.assumptions && focused.result.assumptions.length > 0 && (
              -

              +

              Assumptions in this response

                @@ -980,7 +980,7 @@ export default function ReasoningWorkspace({ {focused.result.relationships && focused.result.relationships.length > 0 && (
                -

                +

                Connections

                  @@ -993,7 +993,7 @@ export default function ReasoningWorkspace({ {focused.result.possibleFollowUpQuestions && focused.result.possibleFollowUpQuestions.length > 0 && (
                  -

                  +

                  Questions this raises

                    @@ -1059,7 +1059,7 @@ export default function ReasoningWorkspace({ {/* Done for now — separate visual area */} {doneForNowIds.length > 0 && (
                    -

                    +

                    Done for now

                    diff --git a/components/scenario-form.jsx b/components/scenario-form.jsx index 9b6ab1c..ef8bff6 100644 --- a/components/scenario-form.jsx +++ b/components/scenario-form.jsx @@ -225,8 +225,16 @@ export default function ScenarioForm() { /* ── RTO.25A — passive late-result branch switcher (experimental) ── */ const BRANCHES = [ - { id: "branch-a", label: "Competitor development" }, - { id: "branch-b", label: "Customer demand" }, + { + id: "branch-a", + label: "Competitor development", + origin: "Whether competitors are developing similar products and when they might release them", + }, + { + id: "branch-b", + label: "Customer demand", + origin: "How many customers will buy the product, and what revenue that represents", + }, ]; const [activeBranchId, setActiveBranchId] = useState("branch-b");