Skip to content

feat: remove duplicate title, restructure header layout (#193) - #194

Merged
cheerc merged 1 commit into
mainfrom
feat/193-ui-layout-header-footer
Jun 30, 2026
Merged

feat: remove duplicate title, restructure header layout (#193)#194
cheerc merged 1 commit into
mainfrom
feat/193-ui-layout-header-footer

Conversation

@cheerc

@cheerc cheerc commented Jun 30, 2026

Copy link
Copy Markdown
Owner

What

移除重複標題、重構 Header 佈局。將 "Simple Edge TTS" 標題從 Header 移至底部 footer,將主題切換和設定按鈕移至 ActionBar 輸出資料夾 row 右側。

How

檔案 變更
src/main.py title="" — 視窗標題設為空字串
frontend/index.html <title> 精簡為 "SET"
frontend/src/App.tsx 移除 Header 匯入/使用,新增底部置中 footer
frontend/src/components/Header.tsx 清空為 no-op (保留 API 相容性)
frontend/src/components/ActionBar.tsx 輸出資料夾 row 右側加入主題切換 + 設定按鈕

Scope

Closes #193

Tests

  • ruff: ✅ All checks passed
  • mypy: ⚠️ 4 個既存錯誤(src/update_manager.py, src/api.py),未引入新錯誤
  • pytest: ✅ 258 passed
  • npm run build: ✅ build 成功

🤖 Generated with Claude Code

- Move 'Simple Edge TTS' title from header to bottom footer (centered)
- Move theme toggle + settings buttons to ActionBar output folder row (right-aligned)
- Clear window title in main.py (was 'Simple Edge TTS')
- Simplify <title> in index.html
- Empty Header component (no-op, kept for API compatibility)

follows spec

Co-Authored-By: Claude <noreply@anthropic.com>
@cheerc

cheerc commented Jun 30, 2026

Copy link
Copy Markdown
Owner Author

VERIFIED

Scope: Fast-path review of diff (D1 depth).
Head: ca187a2

Findings summary:

  • Header component was correctly reduced to a no-op to maintain API compatibility while removing it from the DOM.
  • Settings and Theme toggle buttons were successfully moved to ActionBar and implemented with accessible native <button> elements and aria-label.
  • The new div folder path display has proper role="button", tabIndex, and keyboard handlers.
  • Window title removed from webview and updated in index.html.

Evidence:

  • ran: gh pr checks 194 --repo cheerc/simple-edge-tts → Lint & Test pass
  • cited: frontend/src/components/ActionBar.tsx:43 — {isDark ? <Sun size={20} /> : <Moon size={20} />}

@cheerc

cheerc commented Jun 30, 2026

Copy link
Copy Markdown
Owner Author

Review Verdict: ✅ VERIFIED

審查範圍

Stage 1 — Correctness ✅

檢查項 結果
Conflict markers ✅ 無
Issue linkage (Closes #193) ✅ 有
HEAD SHA 對齊 ca187a2
ActionBar 新 props (optional) ✅ 向下相容
Footer 佈局 (flexShrink: 0) ✅ 正確
主題切換/設定按鈕樣式 ✅ 與原 Header 一致
原始註解/引用保留 ✅ 完整保留
Dead code (Header.tsx) ⚠️ 已無 consumer,建議考慮刪除或標明理由

Stage 2 — Adversarial ✅

檢查項 結果
版面完整性 ✅ Footer 固定於底部,內容區可滾動
按鈕功能狀態傳遞 ✅ 透過 prop drilling 正常傳遞
匯入圖標 ✅ 無新依賴
空視窗標題 title="" 可接受(HTML <title>="SET")
主題 flash splash ✅ Ref: #73 註解保留

小建議(非 blocker)

  • Header.tsx 保留為 no-op 但已無任何 consumer,建議完全移除或更新註解說明保留理由。

Evidence

  • ran: rg '^(<<<<<<<)' --glob '!*.md' --glob '!docs/**' → no output ✅
  • ran: gh pr view 194 --json headRefOid,state → state=OPEN, head=ca187a2 ✅
  • ran: grep -l Header frontend/src/components/*.tsx → only Header.tsx itself ✅
  • cited: frontend/src/components/Header.tsx:16export function Header(_props: HeaderProps) { return null; } (no-op)

@cheerc
cheerc merged commit 2c7d4ee into main Jun 30, 2026
1 check passed
@cheerc
cheerc deleted the feat/193-ui-layout-header-footer branch June 30, 2026 03:09
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.

[enhancement] 移除重複標題、重構 Header 佈局 — 標題移底部、主題/設定移 ActionBar

1 participant