Skip to content

🎨 Palette: [UX improvement] Add generic fallback for empty root directory names - #395

Open
seonghobae wants to merge 2 commits into
masterfrom
feature/palette-root-dir-fallback-12596277149925357841
Open

🎨 Palette: [UX improvement] Add generic fallback for empty root directory names#395
seonghobae wants to merge 2 commits into
masterfrom
feature/palette-root-dir-fallback-12596277149925357841

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

💡 What: Added a generic fallback (/) for directory names when File.getName() returns an empty string (e.g. for root directories).
🎯 Why: Root directories return empty strings for their names. Generating HTML with empty <title> and <h1> tags breaks screen reader accessibility and looks broken visually.
📸 Before/After: Before: Empty title/heading. After: Displays /.
Accessibility: Screen readers will now announce / instead of being silent or confused by empty semantic tags.


PR created automatically by Jules for task 12596277149925357841 started by @seonghobae

Summary by CodeRabbit

  • 접근성 개선

    • 루트 디렉터리에서 생성되는 HTML의 제목과 헤더가 비어 있지 않고 /로 표시됩니다.
    • 서버의 절대 경로가 대체 텍스트로 노출되지 않습니다.
  • 버그 수정

    • 디렉터리 이름이 없는 경우에도 페이지 표시명이 일관되게 제공됩니다.
  • 테스트

    • 루트 디렉터리의 제목과 헤더 표시를 검증하는 테스트를 추가했습니다.

@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6300bf09-abae-41fb-8d55-141d66fa0f74

📥 Commits

Reviewing files that changed from the base of the PR and between 29e1534 and d13aad7.

📒 Files selected for processing (3)
  • .jules/palette.md
  • src/main/kotlin/html4tree/main.kt
  • src/test/kotlin/html4tree/MainTest.kt

📝 Walkthrough

Walkthrough

루트 디렉터리의 빈 이름을 /로 대체합니다. 생성된 HTML의 <title><h1>에 대체 표시명을 사용합니다. 관련 테스트와 접근성 지침을 추가합니다.

Changes

루트 디렉터리 표시명

Layer / File(s) Summary
표시명 대체 및 검증
src/main/kotlin/html4tree/main.kt, src/test/kotlin/html4tree/MainTest.kt, .jules/palette.md
process_dir는 빈 디렉터리 이름을 /로 변환합니다. 생성된 <title><h1>은 변환된 표시명을 사용합니다. 루트 디렉터리 테스트가 이 동작을 검증합니다. 접근성 지침은 절대 경로를 대체 텍스트로 사용하지 않도록 명시합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 빈 루트 디렉터리 이름에 대한 일반 대체값 추가라는 주요 변경 사항을 명확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 feature/palette-root-dir-fallback-12596277149925357841

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.

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