Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions apps/mapgen-studio/.interface-design/system.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,15 @@ the trailing-disclosure placement; keeps the icon-only contract + zoning):
`@container`; the signal chip's seed suffix rides a `@max-3xl:hidden` span
so the chip collapses to `Turn N` before the bar wraps. Full
`Turn N · Seed S` stays in the tooltip/accessible name.
- **Water proof section (ExplorePanel).** The river/lake/floodplain
inspector renders as a collapsible section between Step and Layers: lane
eyebrow per truth class, claim status as status-dot + word (`ready` /
`inspect` / `fail` / `open` / `skip`; projection evidence is steel
"inspect", NEVER success-green — projection masks don't masquerade as
engine truth), module-owned data-color dots on the layer-jump chips.
- **Water stats section (ExplorePanel).** The river/lake/floodplain data
renders as a STATS section between Step and Layers — one compact line per
data family carrying its semantic counts (plan vs engine, e.g. `lake
intent 32 · engine lakes 31`) plus layer-jump chips with module-owned
data-color dots. Divergence counts (mismatch/rejected) wear the warning
tint when nonzero; the collapsed header reads `matches baseline` or `N
mismatched`. PROOF VOCABULARY IS BANNED FROM PRODUCT CHROME: no claim
words, no lane eyebrows, no acceptance/rendered bookkeeping rows — claim
semantics stay in the `riverLakeInspector` module and project docs.
- **Saved-config precedence shows "Custom".** Selection applies the saved
config file EXACTLY (full replace); ANY divergence flips the selector
value itself to a warning-tinted `Custom` entry with a `Re-apply`
Expand Down
12 changes: 6 additions & 6 deletions apps/mapgen-studio/src/app/StudioShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ export function StudioShell(props: StudioShellProps) {
const setExploreStepExpanded = useViewStore((s) => s.setExploreStepExpanded);
const exploreLayersExpanded = useViewStore((s) => s.exploreLayersExpanded);
const setExploreLayersExpanded = useViewStore((s) => s.setExploreLayersExpanded);
const exploreWaterProofExpanded = useViewStore((s) => s.exploreWaterProofExpanded);
const setExploreWaterProofExpanded = useViewStore((s) => s.setExploreWaterProofExpanded);
const exploreWaterStatsExpanded = useViewStore((s) => s.exploreWaterStatsExpanded);
const setExploreWaterStatsExpanded = useViewStore((s) => s.setExploreWaterStatsExpanded);
const stageView = useViewStore((s) => s.stageView);
const setStageView = useViewStore((s) => s.setStageView);
const pipelineSelectedStageId = useViewStore((s) => s.pipelineSelectedStageId);
Expand Down Expand Up @@ -2148,12 +2148,12 @@ export function StudioShell(props: StudioShellProps) {
!exploreStageExpanded &&
!exploreStepExpanded &&
!exploreLayersExpanded &&
!exploreWaterProofExpanded;
!exploreWaterStatsExpanded;
const next = rightCollapsed;
setExploreStageExpanded(next);
setExploreStepExpanded(next);
setExploreLayersExpanded(next);
setExploreWaterProofExpanded(next);
setExploreWaterStatsExpanded(next);
},
toggleLeftPanel: () => {
const leftCollapsed = recipeSectionCollapsed && configSectionCollapsed;
Expand Down Expand Up @@ -2437,8 +2437,8 @@ export function StudioShell(props: StudioShellProps) {
onLayersExpandedChange={setExploreLayersExpanded}
riverLakeInspectorSummary={riverLakeInspectorSummary}
onRiverLakeInspectorLayerSelect={handleRiverLakeInspectorLayerSelect}
waterProofExpanded={exploreWaterProofExpanded}
onWaterProofExpandedChange={setExploreWaterProofExpanded}
waterStatsExpanded={exploreWaterStatsExpanded}
onWaterStatsExpandedChange={setExploreWaterStatsExpanded}
/>
);

Expand Down
10 changes: 5 additions & 5 deletions apps/mapgen-studio/src/stores/viewStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export type ViewState = {
exploreStageExpanded: boolean;
exploreStepExpanded: boolean;
exploreLayersExpanded: boolean;
exploreWaterProofExpanded: boolean;
exploreWaterStatsExpanded: boolean;
// Explore selection (single owner; App no longer mirrors these)
selectedStageId: string;
selectedStepId: string;
Expand All @@ -71,7 +71,7 @@ export type ViewState = {
setExploreStageExpanded: (next: Updater<boolean>) => void;
setExploreStepExpanded: (next: Updater<boolean>) => void;
setExploreLayersExpanded: (next: Updater<boolean>) => void;
setExploreWaterProofExpanded: (next: Updater<boolean>) => void;
setExploreWaterStatsExpanded: (next: Updater<boolean>) => void;
setSelectedStageId: (next: Updater<string>) => void;
setSelectedStepId: (next: Updater<string>) => void;
setStageView: (next: Updater<StageView>) => void;
Expand All @@ -92,7 +92,7 @@ export const useViewStore = create<ViewState>((set) => ({
exploreStageExpanded: true,
exploreStepExpanded: true,
exploreLayersExpanded: true,
exploreWaterProofExpanded: false,
exploreWaterStatsExpanded: false,
selectedStageId: "",
selectedStepId: "",
stageView: "map",
Expand All @@ -118,8 +118,8 @@ export const useViewStore = create<ViewState>((set) => ({
set((s) => ({ exploreStepExpanded: resolve(next, s.exploreStepExpanded) })),
setExploreLayersExpanded: (next) =>
set((s) => ({ exploreLayersExpanded: resolve(next, s.exploreLayersExpanded) })),
setExploreWaterProofExpanded: (next) =>
set((s) => ({ exploreWaterProofExpanded: resolve(next, s.exploreWaterProofExpanded) })),
setExploreWaterStatsExpanded: (next) =>
set((s) => ({ exploreWaterStatsExpanded: resolve(next, s.exploreWaterStatsExpanded) })),
setSelectedStageId: (next) => set((s) => ({ selectedStageId: resolve(next, s.selectedStageId) })),
setSelectedStepId: (next) => set((s) => ({ selectedStepId: resolve(next, s.selectedStepId) })),
setStageView: (next) => set((s) => ({ stageView: resolve(next, s.stageView) })),
Expand Down
28 changes: 14 additions & 14 deletions apps/mapgen-studio/src/ui/components/ExplorePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
Flame } from
'lucide-react';
import { Tooltip, TooltipContent, TooltipTrigger } from '../../components/ui';
import { WaterProofSection } from './WaterProofSection';
import { WaterStatsSection } from './WaterStatsSection';
import type {
RiverLakeFloodplainInspectorSummary,
RiverLakeInspectorLayerRef } from
Expand Down Expand Up @@ -125,9 +125,9 @@ export interface ExplorePanelProps {
/** Callback when a water-proof evidence layer chip is clicked */
onRiverLakeInspectorLayerSelect?: (ref: RiverLakeInspectorLayerRef) => void;
/** Whether the water-proof section is expanded (optional controlled mode) */
waterProofExpanded?: boolean;
/** Callback when waterProofExpanded changes (optional controlled mode) */
onWaterProofExpandedChange?: (expanded: boolean) => void;
waterStatsExpanded?: boolean;
/** Callback when waterStatsExpanded changes (optional controlled mode) */
onWaterStatsExpandedChange?: (expanded: boolean) => void;
}
// ============================================================================
// Component
Expand Down Expand Up @@ -176,13 +176,13 @@ export const ExplorePanel: React.FC<ExplorePanelProps> = ({
onLayersExpandedChange,
riverLakeInspectorSummary,
onRiverLakeInspectorLayerSelect,
waterProofExpanded: waterProofExpandedProp,
onWaterProofExpandedChange
waterStatsExpanded: waterStatsExpandedProp,
onWaterStatsExpandedChange
}) => {
const [localStageExpanded, setLocalStageExpanded] = useState(true);
const [localStepExpanded, setLocalStepExpanded] = useState(true);
const [localLayersExpanded, setLocalLayersExpanded] = useState(true);
const [localWaterProofExpanded, setLocalWaterProofExpanded] = useState(false);
const [localWaterStatsExpanded, setLocalWaterStatsExpanded] = useState(false);
const [groupOpen, setGroupOpen] = useState<Record<string, boolean>>({});

const isStageExpanded = stageExpandedProp ?? localStageExpanded;
Expand All @@ -203,10 +203,10 @@ export const ExplorePanel: React.FC<ExplorePanelProps> = ({
if (layersExpandedProp === undefined) setLocalLayersExpanded(next);
};

const isWaterProofExpanded = waterProofExpandedProp ?? localWaterProofExpanded;
const setIsWaterProofExpanded = (next: boolean) => {
onWaterProofExpandedChange?.(next);
if (waterProofExpandedProp === undefined) setLocalWaterProofExpanded(next);
const isWaterStatsExpanded = waterStatsExpandedProp ?? localWaterStatsExpanded;
const setIsWaterStatsExpanded = (next: boolean) => {
onWaterStatsExpandedChange?.(next);
if (waterStatsExpandedProp === undefined) setLocalWaterStatsExpanded(next);
};
const currentStage = stages.find((s) => s.value === selectedStage);
const currentStep = steps.find((s) => s.value === selectedStep);
Expand Down Expand Up @@ -460,11 +460,11 @@ export const ExplorePanel: React.FC<ExplorePanelProps> = ({
) : null}

{/* WATER PROOF SECTION — River/Lake/Floodplain inspector rows */}
<WaterProofSection
<WaterStatsSection
summary={riverLakeInspectorSummary}
onLayerSelect={onRiverLakeInspectorLayerSelect}
expanded={isWaterProofExpanded}
onExpandedChange={setIsWaterProofExpanded}
expanded={isWaterStatsExpanded}
onExpandedChange={setIsWaterStatsExpanded}
/>

{/* 3. LAYERS SECTION. The debug toggle lives on this header — it filters
Expand Down
216 changes: 0 additions & 216 deletions apps/mapgen-studio/src/ui/components/WaterProofSection.tsx

This file was deleted.

Loading