From 9bfc5230fea3929c8de73e702ecc729fdbf1e039 Mon Sep 17 00:00:00 2001 From: WKJBryan Date: Fri, 12 Jun 2026 14:37:45 +0800 Subject: [PATCH] Redesign Twin Workspace: fix scrolling, grouped nav rail, task-oriented layout The view rendered in normal document flow inside #app (100vh, overflow:hidden), so content below the fold was unreachable. The workspace now owns its scrolling: fixed header, fixed grouped nav rail, and an independently scrolling main pane. - Nav rail groups destinations by task (Work / Review / Configure / Help) with monospace counts; active item gets an accent bar. - Overview is a triage dashboard: clickable stat tiles plus compact decision/action-gap rows that jump to their tab, instead of full cards with inline forms. - Decision cards carry their state on a colored left edge (pending / sealed / matched / missed) with matching status chips, and the outcome form is a labeled grid inside a details section that stays open until an outcome is recorded. - Decision prediction tests now navigate to the Decisions tab, where full cards live after the redesign. Co-Authored-By: Claude Fable 5 --- .../components/TwinReviewDecisions.spec.js | 5 + frontend/src/views/TwinReviewView.vue | 1715 ++++++++++------- 2 files changed, 1060 insertions(+), 660 deletions(-) diff --git a/frontend/src/__tests__/unit/components/TwinReviewDecisions.spec.js b/frontend/src/__tests__/unit/components/TwinReviewDecisions.spec.js index 373fcfa..c72af68 100644 --- a/frontend/src/__tests__/unit/components/TwinReviewDecisions.spec.js +++ b/frontend/src/__tests__/unit/components/TwinReviewDecisions.spec.js @@ -52,6 +52,11 @@ async function mountWithDecisions(items) { twin.listDecisionEpisodes.mockResolvedValue(items) const wrapper = mount(TwinReviewView) await flushPromises() + // Full decision cards live on the Decisions tab; the overview shows compact rows. + await wrapper.findAll('.tab-button') + .find(button => button.text().includes('Decisions')) + .trigger('click') + await flushPromises() return wrapper } diff --git a/frontend/src/views/TwinReviewView.vue b/frontend/src/views/TwinReviewView.vue index 3282cd2..63b9870 100644 --- a/frontend/src/views/TwinReviewView.vue +++ b/frontend/src/views/TwinReviewView.vue @@ -31,516 +31,561 @@ - - -
-
-
- Constitution - {{ activeConstitutionCount }} - {{ constitutionItems.length }} total items -
-
- Action Gaps - {{ activeActionGapCount }} - {{ actionGaps.length }} total gaps -
-
- Decisions - {{ decisions.length }} - {{ pendingFollowUps }} follow-ups pending -
-
- Review - {{ pendingReviewCount }} - digest plus candidate records -
+
+ +
-
-

How To Use

-
+
+ + + + +
+ +
+
+

How To Use

+
+ + +
+
+

+ Start decisions in Canvas, then use Twin Workspace for review, setup, outcomes, + configuration, and benchmark export. +

+
+ +
+
+

Recent Decisions

+
+
+ No decision episodes yet. Start a Decision in Canvas and it will appear here. +
+ +
+ +
+
+

Current Action Gaps

-
-

- Start decisions in Canvas, then use Twin Workspace for review, setup, outcomes, - configuration, and benchmark export. -

+
+ No action gaps found. +
+ +
-
-
-

Recent Decisions

+
+
+
+

Constitution

+ The value rules the twin reasons from — {{ groupedConstitution.length }} dimensions +
+
- No decision episodes yet. + No constitution items yet. Run Constitution to infer them from records and decisions.
- +
+

{{ dimensionLabel(group.dimension) }}

+
+
+ {{ statusLabel(item.status) }} + {{ formatPercent(item.confidence) }} confidence + {{ item.evidence_refs?.length || 0 }} evidence + {{ constitutionSourceLabel(item) }} +
+

{{ item.claim }}

+
+ {{ label }} +
+
+ {{ scope }} +
+ +
+
-
-
-

Current Action Gaps

- +
+
+
+

Action Gaps

+ {{ actionGaps.length }} stated versus revealed patterns +
- No action gaps found. + No action gaps yet.
-
-
-
-
-

Constitution

- {{ groupedConstitution.length }} dimensions +
+
+
+

Decisions

+ {{ decisions.length }} episodes — record what you actually chose to reveal each sealed twin prediction +
- -
+ No decision episodes yet. Start a Decision in Canvas and it will appear here. +
+ +
-
- No constitution items yet. -
-

{{ dimensionLabel(group.dimension) }}

-
-
- {{ statusLabel(item.status) }} - {{ formatPercent(item.confidence) }} confidence - {{ item.evidence_refs?.length || 0 }} evidence - {{ constitutionSourceLabel(item) }} +
+
+
+

Adaptive Digest

+ {{ memoryDigestItems.length }} clustered items +
-

{{ item.claim }}

- {{ label }} + No digest items need review. +
+
+
+ {{ statusLabel(item.state) }} + {{ item.evidence_count }} evidence + {{ item.trigger_reason }} +
+

{{ item.pattern }}

+ {{ item.latest_evidence.summary }} + +
+
+ +
+
+
+

User Records

+ {{ filteredReviewRecords.length }} shown +
+
- {{ scope }} + No records in this state.
- -
+
+
+ {{ kindLabel(item.record.kind) }} + {{ statusLabel(item.record.promotion_state) }} + {{ item.evidence_count }} evidence +
+

{{ item.record.content }}

+
+ + + + + +
+
+
- -
-
-
-

Action Gaps

- {{ actionGaps.length }} stated versus revealed patterns -
-
-
- No action gaps yet. -
- -
- -
-
-
-

Decisions

- {{ decisions.length }} episodes -
-
-
- No decision episodes yet. -
- -
- -
-
-
-
-

Adaptive Digest

- {{ memoryDigestItems.length }} clustered items -
-
-
- No digest items need review. -
-
-
- {{ statusLabel(item.state) }} - {{ item.evidence_count }} evidence - {{ item.trigger_reason }} -
-

{{ item.pattern }}

- {{ item.latest_evidence.summary }} - -
-
- -
-
+
-

User Records

- {{ filteredReviewRecords.length }} shown +

Twin Identity

+ Name and role are required before Twin Simulation can run.
- - {{ statusLabel(state) }} - - -
-
- No records in this state. -
-
-
- {{ kindLabel(item.record.kind) }} - {{ statusLabel(item.record.promotion_state) }} - {{ item.evidence_count }} evidence -
-

{{ item.record.content }}

-
- - - - - -
-
-
-
- -
-
-
-

Twin Identity

- Name and role are required before Twin Simulation can run. + + + +
+
+

Operating Priors

+ Values, taste, constraints, somatic cues, and action tendencies.
- - -
-
-

Operating Priors

- Values, taste, constraints, somatic cues, and action tendencies. -
- - - - - -
- -
- - -
-
-
-

How To Use

- Button guide and short task walkthroughs + + + + +
+
-
-
-

Fast Decision Session

-
    -
  1. Open Canvas and click + New.
  2. -
  3. Choose Decision, then write or paste the decision.
  4. -
  5. Add options, stakes, leaning, and follow-up only when useful.
  6. -
  7. Click Create Reflection Card.
  8. -
  9. Use one feedback button if the card is useful or wrong.
  10. -
+
-

{{ group.title }}

-
- -
-
-
- -
-
-
-

Decision Mirror Config

- Presets change retrieval and scoring weights without hiding raw sub-scores. +
+
+

How To Use

+ Button guide and short task walkthroughs +
-
+
- {{ exportingBenchmark ? 'Exporting...' : 'Export Benchmark' }} - - - -
- + +
+ + +
+
+ +
- {{ weight.label }} - +
+

Advanced Weights

+ 0 ignores the signal, 3 gives it strong priority. +
+ + + {{ weight.label }} + + {{ formatWeight(configDraft.weights[weight.key]) }} + +
- -
+ +