[PR #632] [CLOSED] Web UI: the phone's chats push the page, Delete on the Models page, a thinking bar, peak decode #640

Closed
opened 2026-10-29 21:27:45 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/632
Author: @needmorevram
Created: 10/28/2026
Status: ❌ Closed

Base: main ← Head: ui-redesign


📝 Commits (8)

  • ff46eae Saved on a phone: a bottom sheet
  • f5553b7 The phone's chats push the page aside
  • 7a165ad Models: delete a model, and its downloaded files if asked
  • 2c28cb6 Thinking on a phone: a bar hovering above the message box
  • 5d2aebc Thinking on a phone: a thick bar, a segment a level
  • d57df3e Thinking: the thick bar on wider screens too
  • 2b0c3ef Monitor: the peak decode speed
  • fd01ba3 Models: the running model deleted after a switch, the files no model uses, more DeepSeek and MiniMax engine settings

📊 Changes

16 files changed (+1328 additions, -154 deletions)

View changed files

📝 docs/SETTINGS.md (+5 -5)
📝 serve/models.py (+353 -5)
📝 serve/server.py (+117 -10)
📝 serve/test_dashboard.py (+24 -0)
📝 serve/test_models.py (+293 -3)
📝 serve/web/app.css (+79 -43)
📝 serve/web/app.js (+43 -7)
📝 serve/web/chat-view.js (+26 -27)
📝 serve/web/components.css (+1 -0)
📝 serve/web/models.css (+36 -0)
📝 serve/web/models.js (+214 -9)
📝 serve/web/monitor.css (+1 -0)
📝 serve/web/monitor.js (+9 -0)
📝 serve/web/sidebar.js (+124 -45)
📝 serve/web/state.js (+1 -0)
📝 serve/web/tokens.css (+2 -0)

📄 Description

What

Follow-ups to the web UI redesign (#538), on top of v1.1.35. There are eight commits in six parts.

  1. Saved on a phone. The sidebar's Saved line opens a bottom sheet on phones, not the desktop popover. Drag it down or press Escape to close it.
  2. The phone's chats push the page aside. They slide in from the left beside the page and push it to the right, as ChatGPT's app does, instead of floating over it. The page's edge stays in view, dimmed. A tap there, a swipe to the left, Escape or × closes them, and both slide back.
  3. Delete on the Models page. Every model that isn't running gets a Delete button. Part 6 adds one for the running model.
  4. The thinking bar. The thinking chip opens a thick bar with one segment per level, filled up to the level that is set. It replaces the phone's sheet and the desktop slider panel.
  5. Peak decode on the Monitor. A third speed beside Decode and Prefill: the fastest answer since Maya started.
  6. More on the Models page. The running model can be deleted after a switch to another one, a list of the files in the models folders that no model uses, and more DeepSeek and MiniMax engine settings.

The phone's chats

  • The sidebar keeps its own colour: its glass over the page, without the blur. A blur at its edge would pull in the pushed page's edge.
  • The page behind is inert while the chats are open, and the keyboard goes back to the Chats button when they close.
  • The drawer's old scrim and pop shadow are gone.

Deleting a model

The dialog always takes the model off the list: its config, its run-*.sh/.bat, its .prev and its shared settings. Chats stay.

A box, unticked by default, deletes its downloaded files too. It shows their size and folder first:

  • what the setup downloaded for it (the GGUF files);
  • the pack Maya built;
  • its image encoder;
  • its DFlash2 drafter.

What it never deletes:

  • A file another model here runs from. If two quants share a folder, only its own pack and the GGUF files its sources.json lists go.
  • Anything outside installer.models_dir. For a GGUF of your own, only the pack Maya built from it goes.
  • Anything at all for a config the setup didn't write. Without models_dir, Maya doesn't know which files are its own, so only the config is removed.

Another model drafting with the same DFlash2 file has its --dflash taken out and drafts with MTP from then on. Its .prev is written, and its modification time is kept so the next start still picks the same model.

POST /api/models/delete {file, files, dry_run}:

  • the app's own page only (same-origin check, like the other model endpoints);
  • not while Maya is starting again (the running model: see below);
  • dry_run returns the plan the dialog shows, and whether the model is the one running.

Deleting the running model (part 6)

  • When: only where Maya can start again by itself (started by maya.sh or START-MAYA.bat) and another model can start. Otherwise the running model has no Delete button, as before.
  • The dialog: it asks which model to switch to, with the most recently used one picked. The files box works as above.
  • How: POST /api/models/delete {file, files, then} checks everything first, writes a note (.maya-delete.json), and switches to then the usual way. The next server reads the note once at its start and deletes the old config, and its files if asked, now that the engine that ran from them is gone. The page then says what was deleted.
  • Safety: a note older than 15 minutes is ignored and removed. If the old model runs again (the switch didn't happen), it is not deleted, and the page says why.

Files no model uses (part 6)

A section at the bottom of the Models page, shown only when there is something to list:

  • What is listed: what the models folders hold that no config runs from, such as a download whose config was deleted by hand or by an older version. At a folder's top level, a folder or a file of 100 MB or more (a download's log is not listed). One level down, inside a folder another model runs from, only a folder with a pack of its own, like a GLM quant beside another quant in GLM-5.3-Flash/.
  • What is never listed: a folder a model reads through its pack without its config naming it (DeepSeek's dspark/ and vision/ beside its GGUF folder), a hidden entry, the project folder or the home folder.
  • Which folders: each config's installer.models_dir and the setup's own Maya-data/models.
  • Each item: its size and path, whether a Maya pack is in it, and whether it came from the Hugging Face Hub. Maya may not have downloaded everything listed, and the section says so.
  • Deleting: one item at a time, after a confirm that shows the path and the size. POST /api/models/leftovers {path}: the app's own page only, with the list checked again first.

More engine settings (part 6)

Empty is the engine's own value. docs/SETTINGS.md names the fields.

  • DeepSeek: Prompt lookup (--suffix-draft; off writes --suffix-draft 0, on keeps a config's own match length) and Draft confidence (--dspark-conf, engine default 0.5, shown while DSpark drafts).
  • MiniMax: VRAM kept free (--reserve-gb), Expert cache (--cache-gb, shown with tensor parallel), Prompt chunk (--chunk) and Draft confidence (--dspark-conf, engine default 0.7).
  • Decimals are checked on the server, and a typed comma is read as a point.

The thinking bar

  • Levels: the model's own, so GLM's Off, Low, High and Max, and MiniMax's seven (in smaller type on a phone).
  • Setting a level: a tap, a click or a drag along the bar, snapping to the levels. It is one role="slider", so the arrow keys, Home and End work too.
  • Placement: on a phone it spans the message box. Wider, it sits by the chip: above the box in a conversation, below it on a new chat's centred box.
  • Descriptions: each level's description shows when the pointer is over it.

Peak decode

  • What counts: the fastest single answer's decode speed since the server started, by the engine's own decode clock. Answers shorter than 32 tokens don't count, since a few tokens' speed says little.
  • Where it shows: beside Decode and Prefill, with the time it happened; the tooltip gives its length.
  • API: /metrics carries it in totals.peak_decode (tok_s, tokens, time), and Prometheus gets maya:decode_peak_tokens_seconds.
  • The mock: it can write at a set speed and report its clock the way the engine's DONE does (MAYA_MOCK_TOK_S), so the Monitor's speeds show against it. Off by default, so the tests are unchanged.

Tests

serve.test_models gains Delete and DeletePage:

  • a model's own folder and drafter;
  • off the list only;
  • a folder another model runs from;
  • your own GGUF stays;
  • a shared drafter;
  • a config without the setup's record;
  • the endpoint's checks.

test_dashboard gains test_peak_decode_speed: the fastest of three answers, its Prometheus gauge, and a short answer that doesn't count.

Part 6 adds:

  • Settings: DeepSeek's prompt lookup and draft confidence; MiniMax's memory, prompt chunk and draft confidence;
  • Leftovers: what no model uses (a whole folder, and one quant beside another), never a folder a model reads through its pack, only what is listed is deleted;
  • DeletePage: the running one after a switch, refused where Maya cannot start again by itself, a switch that didn't happen and a stale note, and the leftovers endpoint's checks.

test_models, test_savings, test_dashboard and test_server pass (193 tests before part 6). After part 6: test_models passes (40 tests), and test_dashboard with test_server pass (151 tests). The whole serve suite: 480 tests, 13 failures, all in serve/test_responses_schema.py. They fail the same way on this branch without part 6 (2b0c3ef). Checked in a browser against the mock engine, at phone and desktop sizes, in dark and light, with GLM and MiniMax configs. Part 6 was checked in a headless browser against the mock engine, with DeepSeek, GLM and MiniMax configs and fixture model folders, at 1280 and 390 px wide. That covered the new settings and the commands they make, deleting a leftover, and deleting the running model end to end: the server switched and exited, a second server started on the other config (standing in for maya.py) and deleted the old config and its folder. Not run: a real engine, and the restart through maya.py itself.


🔄 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/mw00/project-maya/pull/632 **Author:** [@needmorevram](https://github.com/needmorevram) **Created:** 10/28/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `ui-redesign` --- ### 📝 Commits (8) - [`ff46eae`](https://github.com/mw00/project-maya/commit/ff46eae24e2971da63745f7ea99087d95a4d6fde) Saved on a phone: a bottom sheet - [`f5553b7`](https://github.com/mw00/project-maya/commit/f5553b77b07b44ec7cff00dc14a4cc20ac333d9d) The phone's chats push the page aside - [`7a165ad`](https://github.com/mw00/project-maya/commit/7a165adba053eb6bd2ab99456df012ebfe69da74) Models: delete a model, and its downloaded files if asked - [`2c28cb6`](https://github.com/mw00/project-maya/commit/2c28cb6c2c7024512c1e13719eff7bce9557b7ab) Thinking on a phone: a bar hovering above the message box - [`5d2aebc`](https://github.com/mw00/project-maya/commit/5d2aebc208f5ea9ea96198a2b3ace58b7f8d04b5) Thinking on a phone: a thick bar, a segment a level - [`d57df3e`](https://github.com/mw00/project-maya/commit/d57df3e5af188e8cc2810d41c887edf1f9212afd) Thinking: the thick bar on wider screens too - [`2b0c3ef`](https://github.com/mw00/project-maya/commit/2b0c3effba90a2eb4a3a9f5ef19abfee77e27742) Monitor: the peak decode speed - [`fd01ba3`](https://github.com/mw00/project-maya/commit/fd01ba396e0b5e31f9a04fd3bca0d637596ccbb2) Models: the running model deleted after a switch, the files no model uses, more DeepSeek and MiniMax engine settings ### 📊 Changes **16 files changed** (+1328 additions, -154 deletions) <details> <summary>View changed files</summary> 📝 `docs/SETTINGS.md` (+5 -5) 📝 `serve/models.py` (+353 -5) 📝 `serve/server.py` (+117 -10) 📝 `serve/test_dashboard.py` (+24 -0) 📝 `serve/test_models.py` (+293 -3) 📝 `serve/web/app.css` (+79 -43) 📝 `serve/web/app.js` (+43 -7) 📝 `serve/web/chat-view.js` (+26 -27) 📝 `serve/web/components.css` (+1 -0) 📝 `serve/web/models.css` (+36 -0) 📝 `serve/web/models.js` (+214 -9) 📝 `serve/web/monitor.css` (+1 -0) 📝 `serve/web/monitor.js` (+9 -0) 📝 `serve/web/sidebar.js` (+124 -45) 📝 `serve/web/state.js` (+1 -0) 📝 `serve/web/tokens.css` (+2 -0) </details> ### 📄 Description ## What Follow-ups to the web UI redesign (#538), on top of v1.1.35. There are eight commits in six parts. 1. **Saved on a phone.** The sidebar's Saved line opens a bottom sheet on phones, not the desktop popover. Drag it down or press Escape to close it. 2. **The phone's chats push the page aside.** They slide in from the left beside the page and push it to the right, as ChatGPT's app does, instead of floating over it. The page's edge stays in view, dimmed. A tap there, a swipe to the left, Escape or × closes them, and both slide back. 3. **Delete on the Models page.** Every model that isn't running gets a Delete button. Part 6 adds one for the running model. 4. **The thinking bar.** The thinking chip opens a thick bar with one segment per level, filled up to the level that is set. It replaces the phone's sheet and the desktop slider panel. 5. **Peak decode on the Monitor.** A third speed beside Decode and Prefill: the fastest answer since Maya started. 6. **More on the Models page.** The running model can be deleted after a switch to another one, a list of the files in the models folders that no model uses, and more DeepSeek and MiniMax engine settings. ## The phone's chats - The sidebar keeps its own colour: its glass over the page, without the blur. A blur at its edge would pull in the pushed page's edge. - The page behind is `inert` while the chats are open, and the keyboard goes back to the Chats button when they close. - The drawer's old scrim and pop shadow are gone. ## Deleting a model The dialog always takes the model off the list: its config, its `run-*.sh`/`.bat`, its `.prev` and its shared settings. Chats stay. A box, unticked by default, deletes its downloaded files too. It shows their size and folder first: - what the setup downloaded for it (the GGUF files); - the pack Maya built; - its image encoder; - its DFlash2 drafter. What it never deletes: - **A file another model here runs from.** If two quants share a folder, only its own pack and the GGUF files its `sources.json` lists go. - **Anything outside `installer.models_dir`.** For a GGUF of your own, only the pack Maya built from it goes. - **Anything at all for a config the setup didn't write.** Without `models_dir`, Maya doesn't know which files are its own, so only the config is removed. Another model drafting with the same DFlash2 file has its `--dflash` taken out and drafts with MTP from then on. Its `.prev` is written, and its modification time is kept so the next start still picks the same model. `POST /api/models/delete {file, files, dry_run}`: - the app's own page only (same-origin check, like the other model endpoints); - not while Maya is starting again (the running model: see below); - `dry_run` returns the plan the dialog shows, and whether the model is the one running. ## Deleting the running model (part 6) - **When:** only where Maya can start again by itself (started by `maya.sh` or `START-MAYA.bat`) and another model can start. Otherwise the running model has no Delete button, as before. - **The dialog:** it asks which model to switch to, with the most recently used one picked. The files box works as above. - **How:** `POST /api/models/delete {file, files, then}` checks everything first, writes a note (`.maya-delete.json`), and switches to `then` the usual way. The next server reads the note once at its start and deletes the old config, and its files if asked, now that the engine that ran from them is gone. The page then says what was deleted. - **Safety:** a note older than 15 minutes is ignored and removed. If the old model runs again (the switch didn't happen), it is not deleted, and the page says why. ## Files no model uses (part 6) A section at the bottom of the Models page, shown only when there is something to list: - **What is listed:** what the models folders hold that no config runs from, such as a download whose config was deleted by hand or by an older version. At a folder's top level, a folder or a file of 100 MB or more (a download's log is not listed). One level down, inside a folder another model runs from, only a folder with a pack of its own, like a GLM quant beside another quant in `GLM-5.3-Flash/`. - **What is never listed:** a folder a model reads through its pack without its config naming it (DeepSeek's `dspark/` and `vision/` beside its GGUF folder), a hidden entry, the project folder or the home folder. - **Which folders:** each config's `installer.models_dir` and the setup's own `Maya-data/models`. - **Each item:** its size and path, whether a Maya pack is in it, and whether it came from the Hugging Face Hub. Maya may not have downloaded everything listed, and the section says so. - **Deleting:** one item at a time, after a confirm that shows the path and the size. `POST /api/models/leftovers {path}`: the app's own page only, with the list checked again first. ## More engine settings (part 6) Empty is the engine's own value. `docs/SETTINGS.md` names the fields. - **DeepSeek:** Prompt lookup (`--suffix-draft`; off writes `--suffix-draft 0`, on keeps a config's own match length) and Draft confidence (`--dspark-conf`, engine default 0.5, shown while DSpark drafts). - **MiniMax:** VRAM kept free (`--reserve-gb`), Expert cache (`--cache-gb`, shown with tensor parallel), Prompt chunk (`--chunk`) and Draft confidence (`--dspark-conf`, engine default 0.7). - Decimals are checked on the server, and a typed comma is read as a point. ## The thinking bar - **Levels:** the model's own, so GLM's Off, Low, High and Max, and MiniMax's seven (in smaller type on a phone). - **Setting a level:** a tap, a click or a drag along the bar, snapping to the levels. It is one `role="slider"`, so the arrow keys, Home and End work too. - **Placement:** on a phone it spans the message box. Wider, it sits by the chip: above the box in a conversation, below it on a new chat's centred box. - **Descriptions:** each level's description shows when the pointer is over it. ## Peak decode - **What counts:** the fastest single answer's decode speed since the server started, by the engine's own decode clock. Answers shorter than 32 tokens don't count, since a few tokens' speed says little. - **Where it shows:** beside Decode and Prefill, with the time it happened; the tooltip gives its length. - **API:** `/metrics` carries it in `totals.peak_decode` (`tok_s`, `tokens`, `time`), and Prometheus gets `maya:decode_peak_tokens_seconds`. - **The mock:** it can write at a set speed and report its clock the way the engine's DONE does (`MAYA_MOCK_TOK_S`), so the Monitor's speeds show against it. Off by default, so the tests are unchanged. ## Tests `serve.test_models` gains `Delete` and `DeletePage`: - a model's own folder and drafter; - off the list only; - a folder another model runs from; - your own GGUF stays; - a shared drafter; - a config without the setup's record; - the endpoint's checks. `test_dashboard` gains `test_peak_decode_speed`: the fastest of three answers, its Prometheus gauge, and a short answer that doesn't count. Part 6 adds: - `Settings`: DeepSeek's prompt lookup and draft confidence; MiniMax's memory, prompt chunk and draft confidence; - `Leftovers`: what no model uses (a whole folder, and one quant beside another), never a folder a model reads through its pack, only what is listed is deleted; - `DeletePage`: the running one after a switch, refused where Maya cannot start again by itself, a switch that didn't happen and a stale note, and the leftovers endpoint's checks. `test_models`, `test_savings`, `test_dashboard` and `test_server` pass (193 tests before part 6). After part 6: `test_models` passes (40 tests), and `test_dashboard` with `test_server` pass (151 tests). The whole `serve` suite: 480 tests, 13 failures, all in `serve/test_responses_schema.py`. They fail the same way on this branch without part 6 (`2b0c3ef`). Checked in a browser against the mock engine, at phone and desktop sizes, in dark and light, with GLM and MiniMax configs. Part 6 was checked in a headless browser against the mock engine, with DeepSeek, GLM and MiniMax configs and fixture model folders, at 1280 and 390 px wide. That covered the new settings and the commands they make, deleting a leftover, and deleting the running model end to end: the server switched and exited, a second server started on the other config (standing in for `maya.py`) and deleted the old config and its folder. Not run: a real engine, and the restart through `maya.py` itself. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:27:45 +07:00
Sign in to join this conversation.
No labels
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
mw00/project-maya#640
No description provided.