Skip to content

Phase 3 refactoring: method naming consistency, section headers, JSDoc, artifact removal - #71

Draft
JansenDevelopment with Copilot wants to merge 2 commits into
developfrom
copilot/refactor-phase-3
Draft

JansenDevelopment with Copilot wants to merge 2 commits into
developfrom
copilot/refactor-phase-3

Conversation

Copilot AI commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Continues the JS refactoring series after phase 2 (shared base editor + schedule card reorganisation). Applies the same conventions to smart-climate-card.js and smart-climate-config-card.js, which were untouched in earlier phases.

smart-climate-card.js

  • Method naming: All 8 public methods renamed to _-prefix private convention, matching the style already used in the schedule card (_onSliderChange, _clearOverride, _formatTime, etc.). All template call-sites updated accordingly.
  • Section headers: // ── Component lifecycle / state ──, // ── Event handlers / service calls ──, // ── Formatters ──
  • JSDoc: Added to _formatSeconds and _formatTime

smart-climate-config-card.js

  • Section headers: // ── Component lifecycle / state ──, // ── Config helpers / service calls ──
  • JSDoc: Added to _adjust and _formatDuration

smart-climate-card-clean.js — deleted

Empty leftover file, never referenced by frontend.py.

Original prompt

Refactoring phase 2 is completed, continue with 3


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…pty artifact

Co-authored-by: JansenDevelopment <181745188+JansenDevelopment@users.noreply.github.com>
Copilot AI changed the title [WIP] Continue refactoring phase 3 Phase 3 refactoring: method naming consistency, section headers, JSDoc, artifact removal Mar 2, 2026
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