[PR #1274] progress_dashboard: hide a whole drive path that contains spaces (DASH-SCRUB-SPACES) #1305

Open
opened 2026-11-26 20:20:48 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1274
Author: @TheGeogeo
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: fix/dashboard-scrub-spaces


📝 Commits (2)

  • cc51471 progress_dashboard: hide a whole drive path that contains spaces (DASH-SCRUB-SPACES)
  • db3f77d progress_dashboard: let the other separator continue a drive path with spaces (DASH-SCRUB-SPACES)

📊 Changes

2 files changed (+33 additions, -2 deletions)

View changed files

📝 tests/test_progress_dashboard.py (+23 -0)
📝 tools/progress_dashboard.py (+10 -2)

📄 Description

Claimed in the coordination issue as: DASH-SCRUB-SPACES — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7144496629

What and why

scrub() in tools/progress_dashboard.py replaces absolute paths outside the repository, file name included, before a line of output reaches the dashboard page. A Windows path that contains a space was only replaced up to the space: cannot read D:\My work\shaders\<name>.fssm became cannot read <path> work\shaders\<name>.fssm, so a carved shader's name stayed in the text. test_progress_dashboard.py showed it by failing when the temp folder has a space in its name.

  • An unquoted drive path now goes on over spaces while a later part still has its separator. The text after the path stays: D:\work\a.txt is not a folder is still <path> is not a folder.
  • The other Windows separator also continues an unquoted path (D:/My work\fixtures\a.txt, D:\My work/stubs/a.spv), but only after a part with no dot or punctuation, so D:\work\a.txt is 3/4 done keeps its prose.
  • A quoted drive path ends at its closing quote, so a file name with spaces is covered there too.

Limits: an unquoted path whose last part has a space (D:\My work\my file.txt) keeps the text after that last space, and so does a bare C:\Users\First Last. Text that follows an unquoted path and contains another path with the same separator is replaced with it, and so is text with any slash after a part with no dot or punctuation (D:\work has 3/4 files). With the other separator, a folder name that has a dot right before a space (D:\My.data dir/x.fssm) still ends the path. POSIX paths are unchanged.

Tested

Head db3f77d4, rebased on main e18b59a5, same patch as f36f661e (git range-diff); it merges cleanly with main 747809e7. Windows 11, Python 3.12.4:

  • python -I -B tests/test_progress_dashboard.py: 52 OK. With this test on the tool of main e48ff037, it has 11 failures, all in test_drive_paths_with_spaces_lose_their_whole_name.
  • tests/test_docs_cli_flags.py, tests/test_text_write_line_endings.py, tests/test_ctest_registration.py, tests/test_ci_registration.py and tests/test_docs_links.py: OK.
  • tests/test_tool_stdout_encoding.py fails in test_every_main_block_reconfigures_stdout, as on main e18b59a5 alone (three tools this change does not touch).
  • compileall, git diff --check and python -I scripts/check_no_game_data.py on the two files: clean.

Earlier head, on Windows 11, Python 3.12.4, on main at 6261ca91 (f36f661e):

  • python -I -B tests/test_progress_dashboard.py — 52 OK, and also with TEMP set to folders whose names have a space, accents, or both. With the new test and the tool from before this pull request, the new test has 11 failures (10 subtests and the Windows sibling case). The four mixed-separator cases fail on 7c001c7f.
  • The drive-path cases also pass with os.name patched to posix.
  • Merges with main 4a50cafc (52 OK), #1256 (c81b2daf, 59 OK), #625 (3c2ad30d, 57 OK) and #1001 (e98b345c, 52 OK) are clean.
  • test_tool_stdout_encoding.py, test_text_write_line_endings.py, test_docs_links.py, test_docs_cli_flags.py, compileall, git diff --check and the no-game-data check passed.

GPUs tested: n/a (CPU-only synthetic tests).

AI-assisted: yes (Claude Code).

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1274 **Author:** [@TheGeogeo](https://github.com/TheGeogeo) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/dashboard-scrub-spaces` --- ### 📝 Commits (2) - [`cc51471`](https://github.com/ubiquitarianism/leonida/commit/cc5147134041ebe1b56379d0d14e573fc1ac536f) progress_dashboard: hide a whole drive path that contains spaces (DASH-SCRUB-SPACES) - [`db3f77d`](https://github.com/ubiquitarianism/leonida/commit/db3f77d45db9ddecd69c07dfa53b9bae4260841d) progress_dashboard: let the other separator continue a drive path with spaces (DASH-SCRUB-SPACES) ### 📊 Changes **2 files changed** (+33 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_progress_dashboard.py` (+23 -0) 📝 `tools/progress_dashboard.py` (+10 -2) </details> ### 📄 Description Claimed in the coordination issue as: DASH-SCRUB-SPACES — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7144496629 ### What and why `scrub()` in `tools/progress_dashboard.py` replaces absolute paths outside the repository, file name included, before a line of output reaches the dashboard page. A Windows path that contains a space was only replaced up to the space: `cannot read D:\My work\shaders\<name>.fssm` became `cannot read <path> work\shaders\<name>.fssm`, so a carved shader's name stayed in the text. `test_progress_dashboard.py` showed it by failing when the temp folder has a space in its name. - An unquoted drive path now goes on over spaces while a later part still has its separator. The text after the path stays: `D:\work\a.txt is not a folder` is still `<path> is not a folder`. - The other Windows separator also continues an unquoted path (`D:/My work\fixtures\a.txt`, `D:\My work/stubs/a.spv`), but only after a part with no dot or punctuation, so `D:\work\a.txt is 3/4 done` keeps its prose. - A quoted drive path ends at its closing quote, so a file name with spaces is covered there too. Limits: an unquoted path whose last part has a space (`D:\My work\my file.txt`) keeps the text after that last space, and so does a bare `C:\Users\First Last`. Text that follows an unquoted path and contains another path with the same separator is replaced with it, and so is text with any slash after a part with no dot or punctuation (`D:\work has 3/4 files`). With the other separator, a folder name that has a dot right before a space (`D:\My.data dir/x.fssm`) still ends the path. POSIX paths are unchanged. ### Tested Head `db3f77d4`, rebased on `main` `e18b59a5`, same patch as `f36f661e` (`git range-diff`); it merges cleanly with `main` `747809e7`. Windows 11, Python 3.12.4: - `python -I -B tests/test_progress_dashboard.py`: 52 OK. With this test on the tool of `main` `e48ff037`, it has 11 failures, all in `test_drive_paths_with_spaces_lose_their_whole_name`. - `tests/test_docs_cli_flags.py`, `tests/test_text_write_line_endings.py`, `tests/test_ctest_registration.py`, `tests/test_ci_registration.py` and `tests/test_docs_links.py`: OK. - `tests/test_tool_stdout_encoding.py` fails in `test_every_main_block_reconfigures_stdout`, as on `main` `e18b59a5` alone (three tools this change does not touch). - `compileall`, `git diff --check` and `python -I scripts/check_no_game_data.py` on the two files: clean. Earlier head, on Windows 11, Python 3.12.4, on `main` at `6261ca91` (`f36f661e`): - `python -I -B tests/test_progress_dashboard.py` — 52 OK, and also with `TEMP` set to folders whose names have a space, accents, or both. With the new test and the tool from before this pull request, the new test has 11 failures (10 subtests and the Windows sibling case). The four mixed-separator cases fail on `7c001c7f`. - The drive-path cases also pass with `os.name` patched to `posix`. - Merges with `main` `4a50cafc` (52 OK), #1256 (`c81b2daf`, 59 OK), #625 (`3c2ad30d`, 57 OK) and #1001 (`e98b345c`, 52 OK) are clean. - `test_tool_stdout_encoding.py`, `test_text_write_line_endings.py`, `test_docs_links.py`, `test_docs_cli_flags.py`, `compileall`, `git diff --check` and the no-game-data check passed. GPUs tested: n/a (CPU-only synthetic tests). AI-assisted: yes (Claude Code). ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1305
No description provided.