Skip to content

fix(accessibility): preserve context for empty root names - #416

Merged
seonghobae merged 2 commits into
masterfrom
fix/root-heading-current-master
Aug 11, 2026
Merged

fix(accessibility): preserve context for empty root names#416
seonghobae merged 2 commits into
masterfrom
fix/root-heading-current-master

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Purpose

Current-protected-base successor to historical PR #414. A filesystem root can expose an empty File.getName(), producing empty <title> and <h1> elements and removing page context for assistive technology.

Test-first evidence

  • protected base and merge base: master@2dce93d1ec32ca6da50b05ecdad301ecfcd0bc8d;
  • test-only head: ee6bc00cc54ed6981aaca7bd715b1e6ab6c23fd4;
  • RED: CI run 31460788515, job 93683712857; 68 tests ran and only testProcessDirEmptyNameFallback failed because title/heading were empty;
  • narrow implementation head: 0f57e118249bb30a51f5b41593e3ec03df37afae;
  • implementation: derive one local directoryName with "Root" fallback and use it for both title and heading;
  • GREEN on the unchanged implementation head:
    • CI run 31461182262;
    • Security Scan run 31461182126;
    • SAST Semgrep run 31461182145.

Scope and lineage

Only src/main/kotlin/html4tree/main.kt and src/test/kotlin/html4tree/MainTest.kt change. Historical PR #414 is superseded; none of its predecessor evidence was reused. The current head is two commits ahead and zero behind the independently resolved protected base.

Summary by CodeRabbit

  • 버그 수정

    • 이름이 없는 디렉터리를 처리할 때 HTML 제목과 헤딩에 기본 이름인 Root가 표시됩니다.
  • 테스트

    • 이름이 없는 디렉터리의 표시 결과가 Root인지 검증하는 테스트를 추가했습니다.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d2854366-ba93-4d4a-b423-224c918ce2a1

📥 Commits

Reviewing files that changed from the base of the PR and between 2dce93d and 0f57e11.

📒 Files selected for processing (2)
  • src/main/kotlin/html4tree/main.kt
  • src/test/kotlin/html4tree/MainTest.kt

📝 Walkthrough

Walkthrough

process_dir가 빈 디렉토리 이름을 "Root"로 대체합니다. 생성된 HTML의 <title><h1>은 정규화된 이름을 사용합니다. 테스트는 빈 이름을 반환하는 가짜 디렉토리로 이 동작을 검증합니다.

Changes

Root 표시 이름 처리

Layer / File(s) Summary
표시 이름 정규화 및 검증
src/main/kotlin/html4tree/main.kt, src/test/kotlin/html4tree/MainTest.kt
process_dir가 빈 디렉토리 이름에 "Root"를 사용합니다. 테스트는 생성된 index.html<title><h1>"Root"가 포함되는지 확인합니다.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: copilot

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/root-heading-current-master

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae marked this pull request as ready for review August 11, 2026 05:34
@seonghobae
seonghobae merged commit 25d6fc4 into master Aug 11, 2026
25 of 27 checks passed
@seonghobae
seonghobae deleted the fix/root-heading-current-master branch August 11, 2026 05:34
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.

1 participant