Skip to content

๐ŸŽจ Palette: ๋ฃจํŠธ ๋””๋ ‰ํ† ๋ฆฌ ์ด๋ฆ„ Fallback ์ถ”๊ฐ€ - #273

Closed
seonghobae wants to merge 1 commit into
masterfrom
palette/root-dir-name-fallback-3259555537994780888
Closed

๐ŸŽจ Palette: ๋ฃจํŠธ ๋””๋ ‰ํ† ๋ฆฌ ์ด๋ฆ„ Fallback ์ถ”๊ฐ€#273
seonghobae wants to merge 1 commit into
masterfrom
palette/root-dir-name-fallback-3259555537994780888

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

๐Ÿ’ก What (์ถ”๊ฐ€๋œ ๊ธฐ๋Šฅ)

  • ํŒŒ์ผ ์‹œ์Šคํ…œ ๋ฃจํŠธ ๋””๋ ‰ํ† ๋ฆฌ ์ฒ˜๋ฆฌ ์‹œ File.getName()์ด ๋นˆ ๋ฌธ์ž์—ด์„ ๋ฐ˜ํ™˜ํ•˜๋Š” ๊ฒฝ์šฐ, absolutePath๋ฅผ Fallback์œผ๋กœ ์‚ฌ์šฉํ•˜์—ฌ <title> ๋ฐ <h1>๋ฅผ ์ƒ์„ฑํ•˜๋„๋ก ๋ณ€๊ฒฝํ–ˆ์Šต๋‹ˆ๋‹ค.

๐ŸŽฏ Why (ํ•ด๊ฒฐํ•œ ์‚ฌ์šฉ์ž ๋ฌธ์ œ)

  • ๊ธฐ์กด์—๋Š” ๋ฃจํŠธ ๋””๋ ‰ํ† ๋ฆฌ์—์„œ ์ƒ์„ฑ๋œ HTML ํŠธ๋ฆฌ์˜ <title> ๋ฐ <h1> ์š”์†Œ๊ฐ€ ์™„์ „ํžˆ ๋น„์–ด ์žˆ์–ด, ์‚ฌ์šฉ์ž(ํŠนํžˆ ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์‚ฌ์šฉ์ž)๊ฐ€ ํ˜„์žฌ ์œ„์น˜๋ฅผ ํŒŒ์•…ํ•˜๊ธฐ ์–ด๋ ค์› ์Šต๋‹ˆ๋‹ค.

๐Ÿ“ธ Before/After

  • Before: <title></title>, <h1></h1> (๋ฃจํŠธ ๋””๋ ‰ํ† ๋ฆฌ์˜ ๊ฒฝ์šฐ)
  • After: <title>/</title>, <h1>/</h1> ๋“ฑ absolutePath๋ฅผ ํ‘œ์‹œ.

โ™ฟ Accessibility (์ ‘๊ทผ์„ฑ ๊ฐœ์„  ์‚ฌํ•ญ)

  • ์Šคํฌ๋ฆฐ ๋ฆฌ๋”๊ฐ€ ๋ฃจํŠธ ๋””๋ ‰ํ† ๋ฆฌ์—์„œ๋„ ๋ช…ํ™•ํ•˜๊ณ  ์˜๋ฏธ ์žˆ๋Š” ํŽ˜์ด์ง€ ์ œ๋ชฉ๊ณผ ํ—ค๋”ฉ์„ ์†Œ๋ฆฌ๋‚ด์–ด ์ฝ์„ ์ˆ˜ ์žˆ๊ฒŒ ๋˜์–ด ๋‚ด๋น„๊ฒŒ์ด์…˜ ์ ‘๊ทผ์„ฑ์ด ํ–ฅ์ƒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

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

Copilot AI review requested due to automatic review settings July 26, 2026 03:11
@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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the generated directory listing HTML so that when File.getName() is empty (notably for filesystem root directories), the page <title> and <h1> fall back to using the directoryโ€™s absolutePath, improving context for users (including screen reader users).

Changes:

  • Add dirNameToDisplay fallback (name โ†’ absolutePath when empty) and use it for <title>/<h1> in process_dir.
  • Add a unit test covering the empty-name fallback behavior.
  • Document the learned rule and action in .jules/palette.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/main/kotlin/html4tree/main.kt Adds a display-name fallback for empty directory names and applies it to <title>/<h1>.
src/test/kotlin/html4tree/MainTest.kt Adds a regression test validating the fallback behavior when getName() returns "".
.jules/palette.md Documents the root-directory empty-name behavior and the recommended fallback approach.

๐Ÿ’ก Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

${cssContent} </style>
"""

val dirNameToDisplay = curr_dir.getName().ifEmpty { curr_dir.absolutePath }

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by draft canonical #364. The same absolute-path fallback for filesystem roots is retained there under a bounded post-#363 accessibility contract. #364 must still centralize one escaped display label, prove root and ordinary generated pages, add APA 7 doctoring and changelog, and pass fresh exact-head quality/security checks plus independent approval. No evidence from this duplicate head is reused.

@seonghobae seonghobae closed this Aug 5, 2026
@google-labs-jules

Copy link
Copy Markdown

Closing as superseded by draft canonical #364. The same absolute-path fallback for filesystem roots is retained there under a bounded post-#363 accessibility contract. #364 must still centralize one escaped display label, prove root and ordinary generated pages, add APA 7 doctoring and changelog, and pass fresh exact-head quality/security checks plus independent approval. No evidence from this duplicate head is reused.

Understood. Acknowledging that this work is now superseded by #364 and stopping work on this task.

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