[PR #480] [CLOSED] serve, web: a space-free vision temp dir, lazy vision, and a Chinese UI #2658

Closed
opened 2026-11-04 02:02:09 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/480
Author: @ziphao2010
Created: 10/2/2026
Status: ❌ Closed

Base: main ← Head: vision-lazy-cn-ui


📝 Commits (1)

  • f93b0f5 serve, web: a space-free vision temp dir, lazy vision, and a Chinese UI

📊 Changes

5 files changed (+519 additions, -16 deletions)

View changed files

📝 serve/server.py (+43 -14)
📝 serve/test_server.py (+33 -0)
➕ serve/web/i18n.js (+437 -0)
📝 serve/web/index.html (+3 -1)
📝 serve/web/monitor.html (+3 -1)

📄 Description

Fixes vision on Windows machines where %TEMP% (or the user name) contains a space, makes --lazy work with vision enabled, and adds a Chinese UI.

  • serve/server.py: Vision.work_dir() now picks a temporary directory whose path has no space. The encoder splits its ENC <image> <out> line at the last space (tools/vision/strata_vision.cpp: parse_enc), so a space in the temp path made every image fail with Unable to open file.
  • serve/server.py: --lazy starts the encoder on the first request instead of refusing to start when vision is on; Vision(start=False) plus alive() / restart() / close() handle an encoder that has not started yet.
  • serve/test_server.py: tests for both.
  • serve/web: i18n.js (Chinese dictionary) loaded by index.html and monitor.html; both pages are lang="zh-CN" and carry a data-URI favicon.

🔄 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/Niko1221/Strata/pull/480 **Author:** [@ziphao2010](https://github.com/ziphao2010) **Created:** 10/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `vision-lazy-cn-ui` --- ### 📝 Commits (1) - [`f93b0f5`](https://github.com/Niko1221/Strata/commit/f93b0f57c6c5f5ddb9350c272ca53a73d0bdc7c1) serve, web: a space-free vision temp dir, lazy vision, and a Chinese UI ### 📊 Changes **5 files changed** (+519 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `serve/server.py` (+43 -14) 📝 `serve/test_server.py` (+33 -0) ➕ `serve/web/i18n.js` (+437 -0) 📝 `serve/web/index.html` (+3 -1) 📝 `serve/web/monitor.html` (+3 -1) </details> ### 📄 Description Fixes vision on Windows machines where `%TEMP%` (or the user name) contains a space, makes `--lazy` work with vision enabled, and adds a Chinese UI. - `serve/server.py`: `Vision.work_dir()` now picks a temporary directory whose path has no space. The encoder splits its `ENC <image> <out>` line at the last space (`tools/vision/strata_vision.cpp: parse_enc`), so a space in the temp path made every image fail with `Unable to open file`. - `serve/server.py`: `--lazy` starts the encoder on the first request instead of refusing to start when vision is on; `Vision(start=False)` plus `alive()` / `restart()` / `close()` handle an encoder that has not started yet. - `serve/test_server.py`: tests for both. - `serve/web`: `i18n.js` (Chinese dictionary) loaded by `index.html` and `monitor.html`; both pages are `lang="zh-CN"` and carry a data-URI favicon. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:02:09 +07:00
Sign in to join this conversation.
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
Niko1221/Strata#2658
No description provided.