Skip to content

Claude/UI component cleanup - #108

Merged
jravani merged 6 commits into
mainfrom
claude/ui-component-cleanup
Aug 1, 2026
Merged

jravani merged 6 commits into
mainfrom
claude/ui-component-cleanup

Conversation

@jravani

@jravani jravani commented Aug 1, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings August 1, 2026 21:06
@jravani
jravani merged commit d78ebb3 into main Aug 1, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

It introduces a build-breaking relative import in shared/energyTotals.ts and also maps coolingKwh into the UI’s “Hot Water” total when timeseries data is missing, which yields incorrect displayed values.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR refactors the Building Configurator UI by extracting previously inlined layout/utility logic into dedicated components and helper modules, simplifying BuildingConfigurator.tsx and removing legacy/unused UI pieces.

Changes:

  • Extracted header/footer/dialog and overview/configure layouts into layout/* components.
  • Extracted “new surface” creation logic and energy totals formatting/computation into shared/* helper modules.
  • Removed deprecated ConfiguratorStyles and deleted legacy ElementPanel/ElementList implementations.
File summaries
File Description
src/app/components/BuildingConfigurator/shared/ui.tsx Removes deprecated ConfiguratorStyles no-op component.
src/app/components/BuildingConfigurator/shared/surfaceFactory.ts Adds helper to build seeded default/custom surfaces and a roof-config type guard.
src/app/components/BuildingConfigurator/shared/energyTotals.ts Adds shared energy totals formatting/computation and demand-card row config.
src/app/components/BuildingConfigurator/layout/OverviewLayout.tsx New overview workspace layout wrapper (snapshot aside + envelope column).
src/app/components/BuildingConfigurator/layout/EnergyDemandCard.tsx New extracted preliminary energy demand card UI.
src/app/components/BuildingConfigurator/layout/ConfigurePanel.tsx New extracted configure center-panel router (building/surfaces/tech editors).
src/app/components/BuildingConfigurator/layout/ConfigureLayout.tsx New configure workspace layout (preview + demand + editor + selector).
src/app/components/BuildingConfigurator/layout/ConfiguratorHeader.tsx New extracted configurator header bar (mode/workspace/export/import/close).
src/app/components/BuildingConfigurator/layout/ConfiguratorFooter.tsx New extracted footer actions (reset/recalculate).
src/app/components/BuildingConfigurator/layout/CloseConfirmDialog.tsx New extracted unsaved-changes close confirmation dialog.
src/app/components/BuildingConfigurator/configure/surfaces/SurfaceGroupSelector.tsx Exports props interface for reuse by the new layout components.
src/app/components/BuildingConfigurator/configure/surfaces/ElementPanel.tsx Deletes legacy element panel implementation.
src/app/components/BuildingConfigurator/configure/surfaces/ElementList.tsx Deletes legacy element list implementation.
src/app/components/BuildingConfigurator/BuildingConfigurator.tsx Refactors main component to compose extracted layout/components and shared helpers.
Review details

Suppressed comments (1)

src/app/components/BuildingConfigurator/layout/ConfigureLayout.tsx:94

  • This dismiss button is rendered as just "×" with no accessible name, so screen readers won't announce what it does. Add an aria-label (and optionally a title) to describe the action.
              <button
                type="button"
                onClick={onClearPvInvalidated}
                className="shrink-0 cursor-pointer text-sm leading-none text-amber-600"
              >×</button>
  • Files reviewed: 14/14 changed files
  • Comments generated: 3
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment on lines +5 to +6
import type { EnergyTotals, LoadDataPoint } from '../../lib/loadProfile';
import type { ThermalSummary } from '../../lib/buemAdapter';
Comment on lines +76 to +80
<button
type="button"
onClick={onClearUploadError}
className="shrink-0 cursor-pointer text-sm leading-none text-destructive"
>×</button>
Comment on lines +35 to +37
heating: thermalSummary.heatingKwh.toFixed(0),
electricity: thermalSummary.electricityKwh.toFixed(0),
hotwater: thermalSummary.coolingKwh.toFixed(0),
@jravani
jravani deleted the claude/ui-component-cleanup branch August 4, 2026 00:19
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.

2 participants