Skip to content

Improve text wrapping for folder paths and free space display#727

Merged
tillkruss merged 3 commits into
developfrom
claude/path-breaking-behavior-sh93x5
Jul 7, 2026
Merged

Improve text wrapping for folder paths and free space display#727
tillkruss merged 3 commits into
developfrom
claude/path-breaking-behavior-sh93x5

Conversation

@tillkruss

Copy link
Copy Markdown
Collaborator

Summary

Improves the layout of root folder information in instance views by controlling where text can wrap, ensuring file paths and disk space values display more naturally.

Changes

  • File paths: Insert zero-width spaces after each / character to allow paths to wrap only at natural boundaries (between directory levels) rather than breaking arbitrarily
  • Free space values: Replace spaces with non-breaking spaces in the free space text (e.g., "27.6 TB free") to keep the value on a single line and prevent awkward splits between the number and unit

Implementation details

  • Uses Unicode zero-width space (\u{200B}) to guide text wrapping without affecting visual appearance
  • Uses Unicode non-breaking space (\u{00A0}) to bind related text components together
  • Both changes are applied via replacingOccurrences(of:with:) on the label strings before creating AttributedString instances
  • Includes clarifying comments explaining the rationale for each approach

https://claude.ai/code/session_01PZurKUsusy7ELBHXQqFK36

claude and others added 3 commits July 7, 2026 14:20
The free-space value in the root folder picker could wrap mid-value
(e.g. "27.6" / "TB free"). Join its words with non-breaking spaces so
it stays intact, and allow the path to wrap only at its slashes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZurKUsusy7ELBHXQqFK36
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZurKUsusy7ELBHXQqFK36
Signed-off-by: Till Krüss <tillkruss@users.noreply.github.com>
@tillkruss tillkruss merged commit 169a7dd into develop Jul 7, 2026
4 checks passed
@tillkruss tillkruss deleted the claude/path-breaking-behavior-sh93x5 branch July 7, 2026 15:02

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1833622d14

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

var string = AttributedString(label)
// Allow the path to wrap only after its slashes (zero-width space), so a long
// path breaks across lines the way a file path naturally reads.
var string = AttributedString(label.replacingOccurrences(of: "/", with: "/\u{200B}"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add required release notes for this UI change

This changes the user-visible root-folder label rendering in the add/edit media pickers. The repository's AGENTS.md requires user-facing changes to add a CHANGELOG.md entry under Unreleased and keep TestFlight/WhatToTest.en-US.txt matching it; this commit only changes Instance.swift, so the release notes and TestFlight test text will omit this visible change.

Useful? React with 👍 / 👎.

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