Improve Android app UI and controller flows

This commit is contained in:
2026-10-09 16:43:58 +08:00
parent c0e26b97fe
commit 608229a497
90 changed files with 8103 additions and 1133 deletions
@@ -0,0 +1,248 @@
requirements 未变化,跳过依赖安装。
> <仓库根目录>\测试相关资料\如何测试\本机测试环境\.venv\Scripts\python.exe -m pip check
No broken requirements found.
已清理:<仓库根目录>\测试相关资料\如何测试\本机测试环境\work\pytest
> <仓库根目录>\测试相关资料\如何测试\本机测试环境\.venv\Scripts\python.exe -m pytest -q -p no:cacheprovider --basetemp=<仓库根目录>\测试相关资料\如何测试\本机测试环境\work\pytest
........................................................................ [ 13%]
........................................................................ [ 27%]
........................................................................ [ 41%]
....................................sssssss.......s..................... [ 55%]
........................................................................ [ 68%]
.......s................................................................ [ 82%]
........................................................................ [ 96%]
.................. [100%]
============================== warnings summary ===============================
..\测试相关资料\如何测试\本机测试环境\.venv\Lib\site-packages\dbus_next\service.py:87
..\测试相关资料\如何测试\本机测试环境\.venv\Lib\site-packages\dbus_next\service.py:87
..\测试相关资料\如何测试\本机测试环境\.venv\Lib\site-packages\dbus_next\service.py:87
..\测试相关资料\如何测试\本机测试环境\.venv\Lib\site-packages\dbus_next\service.py:87
..\测试相关资料\如何测试\本机测试环境\.venv\Lib\site-packages\dbus_next\service.py:87
<仓库根目录>\测试相关资料\如何测试\本机测试环境\.venv\Lib\site-packages\dbus_next\service.py:87: DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
@no_type_check_decorator
..\测试相关资料\如何测试\本机测试环境\.venv\Lib\site-packages\dbus_next\service.py:293: 10 warnings
<仓库根目录>\测试相关资料\如何测试\本机测试环境\.venv\Lib\site-packages\dbus_next\service.py:293: DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
@no_type_check_decorator
..\测试相关资料\如何测试\本机测试环境\.venv\Lib\site-packages\fastapi\routing.py:234: 83 warnings
tests/test_animations.py: 913 warnings
tests/test_api.py: 2075 warnings
tests/test_fonts.py: 249 warnings
tests/test_frp.py: 332 warnings
tests/test_library_order.py: 332 warnings
tests/test_media_conversion.py: 830 warnings
tests/test_mobile_control.py: 1162 warnings
tests/test_ota.py: 249 warnings
tests/test_performance_mode.py: 83 warnings
tests/test_scene_layers.py: 166 warnings
tests/test_templates.py: 664 warnings
tests/test_ui_copy_editor.py: 599 warnings
tests/test_wifi.py: 249 warnings
<仓库根目录>\测试相关资料\如何测试\本机测试环境\.venv\Lib\site-packages\fastapi\routing.py:234: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
is_coroutine = asyncio.iscoroutinefunction(dependant.call)
app\main.py:2049: 1 warning
tests/test_animations.py: 11 warnings
tests/test_api.py: 25 warnings
tests/test_fonts.py: 3 warnings
tests/test_frp.py: 4 warnings
tests/test_library_order.py: 4 warnings
tests/test_media_conversion.py: 10 warnings
tests/test_mobile_control.py: 14 warnings
tests/test_ota.py: 3 warnings
tests/test_performance_mode.py: 1 warning
tests/test_scene_layers.py: 2 warnings
tests/test_templates.py: 8 warnings
tests/test_ui_copy_editor.py: 7 warnings
tests/test_wifi.py: 3 warnings
<仓库根目录>\核桃派软件源代码\app\main.py:2049: DeprecationWarning:
on_event is deprecated, use lifespan event handlers instead.
Read more about it in the
[FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/).
@app.on_event("startup")
..\测试相关资料\如何测试\本机测试环境\.venv\Lib\site-packages\fastapi\applications.py:4495: 2 warnings
tests/test_animations.py: 22 warnings
tests/test_api.py: 50 warnings
tests/test_fonts.py: 6 warnings
tests/test_frp.py: 8 warnings
tests/test_library_order.py: 8 warnings
tests/test_media_conversion.py: 20 warnings
tests/test_mobile_control.py: 28 warnings
tests/test_ota.py: 6 warnings
tests/test_performance_mode.py: 2 warnings
tests/test_scene_layers.py: 4 warnings
tests/test_templates.py: 16 warnings
tests/test_ui_copy_editor.py: 14 warnings
tests/test_wifi.py: 6 warnings
<仓库根目录>\测试相关资料\如何测试\本机测试环境\.venv\Lib\site-packages\fastapi\applications.py:4495: DeprecationWarning:
on_event is deprecated, use lifespan event handlers instead.
Read more about it in the
[FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/).
return self.router.on_event(event_type)
app\main.py:2079: 1 warning
tests/test_animations.py: 11 warnings
tests/test_api.py: 25 warnings
tests/test_fonts.py: 3 warnings
tests/test_frp.py: 4 warnings
tests/test_library_order.py: 4 warnings
tests/test_media_conversion.py: 10 warnings
tests/test_mobile_control.py: 14 warnings
tests/test_ota.py: 3 warnings
tests/test_performance_mode.py: 1 warning
tests/test_scene_layers.py: 2 warnings
tests/test_templates.py: 8 warnings
tests/test_ui_copy_editor.py: 7 warnings
tests/test_wifi.py: 3 warnings
<仓库根目录>\核桃派软件源代码\app\main.py:2079: DeprecationWarning:
on_event is deprecated, use lifespan event handlers instead.
Read more about it in the
[FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/).
@app.on_event("shutdown")
tests/test_media_conversion.py::test_free_crop_can_leave_only_one_source_pixel_visible_at_each_corner
tests/test_media_conversion.py::test_free_crop_can_leave_only_one_source_pixel_visible_at_each_corner
tests/test_media_conversion.py::test_free_crop_can_leave_only_one_source_pixel_visible_at_each_corner
tests/test_media_conversion.py::test_free_crop_can_leave_only_one_source_pixel_visible_at_each_corner
<仓库根目录>\核桃派软件源代码\tests\test_media_conversion.py:134: DeprecationWarning: Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.
assert sum(pixel[0] > 240 for pixel in output.getdata()) == 1
tests/test_templates.py::test_template_crud_copy_persistence_and_thumbnail_cleanup
<仓库根目录>\核桃派软件源代码\tests\test_templates.py:165: DeprecationWarning: Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.
assert len(set(image.getdata())) > 1
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
513 passed, 9 skipped, 8390 warnings in 80.59s (0:01:20)
> "C:\Program Files\nodejs\node.EXE" --test tests/test_animation_ui.mjs tests/test_canvas_tools.mjs tests/test_color_math.mjs tests/test_current_display_playback_ui.mjs tests/test_device_ui.mjs tests/test_font_picker.mjs tests/test_frp_ui.mjs tests/test_interaction_feedback.mjs tests/test_scene_model.mjs tests/test_scene_layers.mjs tests/test_settings_ui.mjs tests/test_template_management_ui.mjs tests/test_ui_copy_editor.mjs tests/test_wifi_ui.mjs tests/test_workspace_order_ui.mjs
✔ derives automatic frame names from current animation name and position (0.9515ms)
✔ keeps custom frame names and restores automatic names when cleared (0.1245ms)
✔ builds non-repeating animation edit context names (0.261ms)
✔ selects saved animation preview frames by ordered durations (1.2698ms)
✔ loads every preview frame through revision-checked pagination (0.9708ms)
✔ validates configurable animation preview concurrency (0.3327ms)
✔ rejects mixed revisions instead of showing a partial animation (0.5586ms)
✔ validates frame duration only when explicitly called (0.4824ms)
✔ moves selected frames as one ordered group (0.2395ms)
✔ protects an eight pixel ring around interactive drag controls (0.2648ms)
✔ reorders mixed library keys without mutating the source list (0.1429ms)
✔ restores drag eligibility after protected pointer cancellation and drag end (0.4837ms)
✔ animation workspace exposes two previews and the simplified control order (7.7914ms)
✔ normal and pixel modes expose independent ranges and presets (1.4623ms)
✔ pixel stamps are exact squares from 1x1 through 4x4 (0.2562ms)
✔ pixel stamps clip at every canvas edge (0.2164ms)
✔ normal circle geometry remains unchanged (0.1049ms)
✔ line interpolation includes endpoints without coordinate gaps (0.2417ms)
✔ older tools migrate while v3 restores the coordinate guide choice (0.2446ms)
✔ coordinate guide spacing adapts to the transformed logical pixel size (0.1592ms)
✔ coordinate guide ticks preserve logical values through zoom and pan (0.2081ms)
✔ pixel mode markup and grid stay accessible and non-interactive (7.7742ms)
✔ pixel undo history stores changed snapshots, caps entries, and clears (0.4387ms)
✔ canvas view clamps scale and keeps a visible section in the viewport (0.188ms)
✔ zooming around an anchor preserves its logical position (0.13ms)
✔ floating editor button stays inside its safe viewport bounds (0.0947ms)
✔ canvas editor markup, guarded input, and checkpoint events stay wired (3.4305ms)
✔ normalizes and converts hexadecimal colors (1.9821ms)
✔ converts RGB and HSV boundaries (0.5703ms)
✔ round trips representative colors within 8-bit rounding (0.5308ms)
✔ recent colors deduplicate, normalize, and evict the oldest (0.5626ms)
✔ formats and projects looping playback without moving paused content (1.1975ms)
✔ seek dispatcher keeps one request in flight and flushes the newest position (4.4609ms)
✔ topbar current display dialog exposes static close and animation controls (6.2645ms)
✔ device workspace exposes the compact immediate pure-color test flow (9.8628ms)
✔ font catalog normalization, grouping, and search are stable (1.5036ms)
✔ font picker implements commit-only searchable combobox keyboard behavior (5.6835ms)
✔ settings places unrestricted FRP maintenance at the bottom (6.9486ms)
✔ FRP editor uses raw server storage and official validation errors (2.167ms)
✔ network diagnostics renders layered evidence (2.1028ms)
✔ unavailable controls never masquerade as indefinite loading (10.083ms)
✔ action controls do not bypass the shared state module (11.6691ms)
✔ HTTP requests time out with a stable user-facing error (22.3421ms)
✔ demo library actions stay black, explain restrictions, and preserve copy (3.2743ms)
✔ sortable cards protect controls and keep demo cards fixed (2.9684ms)
✔ old scene migration rejects unknown fields and duplicate text without filtering (64.7563ms)
✔ PNG compression round trips sparse and full brush pixels without DOM (6.196ms)
✔ blank and black are distinct; independent backgrounds follow layer order (6.6852ms)
✔ disabled background colors stay independent through storage and copy (22.0249ms)
✔ extended pixels survive storage but never enter the central output (9.2346ms)
✔ move preview does not mutate source; confirmed clipping removes only outside ink (19.7505ms)
✔ text clipping follows anchor and scale and is retained after edit/reload/copy (13.7559ms)
✔ multiple text groups isolate edits, copies and IDs (1.2854ms)
✔ strict v2 storage protects unknown data and the final brush invariant (8.3614ms)
✔ creates a fixed 64x64 RGB scene (10.9456ms)
✔ serializes pixelRgb as base64 and round trips an independent scene (37.0409ms)
✔ moves a valid v1 draft to the stable key before removing exact legacy keys (49.945ms)
✔ keeps the v1 draft and all legacy keys when stable-key migration cannot write (24.5337ms)
✔ preserves and blocks a future stable draft instead of falling back or writing blank (8.204ms)
✔ preserves and blocks a damaged stable draft (0.4319ms)
✔ does not discard a damaged higher-priority legacy key during fallback migration (2.5171ms)
✔ rejects damaged scene roots while skipping only damaged elements (14.877ms)
✔ normalizes text fields and creates a centered lowercase ok element (0.6562ms)
✔ migrates the first valid canvas by v3, v2, legacy priority and merges text v1 (21.5273ms)
✔ supports independent add, update, and delete operations for multiple text elements (0.9531ms)
✔ duplicates with a deep copy, new id, 2px offset, and topmost order (0.6196ms)
✔ alpha-composites full RGBA layers in array order without mutating inputs (3.6943ms)
✔ settings brightness explains an active temporary display-test override (9.7684ms)
✔ settings exposes full OTA upload progress and service recovery polling (8.1602ms)
✔ settings automatically opens and safely copies a detailed OTA failure log (8.1723ms)
✔ settings exposes a transactional performance-mode switch with the fixed warning (5.1003ms)
✔ settings exposes persisted animation preview concurrency below performance mode (4.0705ms)
✔ template edit baseline distinguishes clean, dirty, and unbound scenes (3.5809ms)
✔ template manager uses a monitor and unified four-row card actions (14.6767ms)
✔ animation editing backs up and restores template edit ownership (2.2034ms)
✔ special editor exposes the agreed modes and guarded editing flow (14.5121ms)
✔ latched WiFi draft state remains dirty until explicitly cleared (4.2347ms)
✔ WiFi settings expose independent network and prompt-delay controls (6.8702ms)
✔ workspace order resolves saved ids and appends new registrations (1.8016ms)
✔ workspace order movement is immutable and respects both boundaries (0.3724ms)
✔ drawer exposes one editable list and commits only from the save action (10.7414ms)
ℹ tests 81
ℹ suites 0
ℹ pass 81
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 693.5062
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\animation-thumbnail-preview.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\animation-ui-model.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\app.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\canvas-tools-model.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\color-math.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\color-picker.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\core.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\current-display-playback.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\font-picker.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\interaction-feedback.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\media-crop-geometry.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\media-import-ui-model.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\pixel-png.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\scene-board.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\scene-model-v1.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\scene-model.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\sortable-card.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\template-edit-model.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\ui-copy-runtime.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\vendor\fflate\fflate.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\views\animations.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\views\canvas.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\views\device.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\views\frp-settings.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\views\layers.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\views\media-import.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\views\settings.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\views\templates.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\views\text.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\views\wifi-settings.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\wifi-draft-state.js
> "C:\Program Files\nodejs\node.EXE" --check <仓库根目录>\核桃派软件源代码\app\static\workspace-order.js
> "C:\Program Files\nodejs\node.EXE" --check app/ui_copy_editor/static/editor.js
> <仓库根目录>\测试相关资料\如何测试\本机测试环境\.venv\Scripts\python.exe scripts/build_ui_copy_catalog.py --check
ui-copy.json is current
本机测试套件通过:all