Skip to content

Dashboard UI Improvements. - #121

Open
3735943886 wants to merge 3 commits into
anszom:masterfrom
3735943886:pr/management-ui
Open

Dashboard UI Improvements.#121
3735943886 wants to merge 3 commits into
anszom:masterfrom
3735943886:pr/management-ui

Conversation

@3735943886

@3735943886 3735943886 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Show the ThinQ name for each appliance. The panel listed a UUID and a model id;
The bridge already reads the account's aliases for registration — this keeps the list and
hands it to the panel, refreshed on login, register and logout. Costs nothing to an
installation without an account: no row has a name, so the column is not drawn.

Reconnect a page restored from the back/forward cache. Back from the monitor landed
on an empty panel for five seconds: the browser closes the socket when it caches the
page, so the close handler ran on the way back in.

Fit the device list on a phone. Six columns, one a 36-character UUID, scrolled
sideways. Below the breakpoint each row becomes a card, with the bridge switch and
monitor button pinned right. Nothing is dropped — name and id ellipsize and carry their
full text as title. Auto-scroll also moves out of the "Messages" heading, which was
acting as a float container and splitting the switch across a wrap.

3735943886 and others added 3 commits August 3, 2026 09:34
Pressing Back from the device monitor landed on a management panel with no device
list and a red status, for five seconds. The browser closes a page's WebSocket when
it puts the page in the back/forward cache, so the close handler runs on the way
back in, hides everything behind .hide-when-offline, and waits out the retry timer
before anything reappears.

Both pages reconnect on a persisted pageshow now. Not conditional on the socket
reading as CLOSED, which was the first thing tried and did nothing: a page coming
back from the cache can still report OPEN at pageshow time and only fire its close
a moment later, so the check fell through and the close then queued the same
five-second wait. The old socket is detached first, so that close cannot queue a
second reconnect on top of this one.

The retry runs at 250 ms the first time and backs off to five seconds only if that
fails too, which also covers rethink being restarted underneath an open page.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The panel listed a UUID and a model id, which is everything rethink knows and
nothing a person uses. Four identical ceiling cassettes were four rows that differed
only in the first eight characters of a UUID, and telling which one was the bedroom
meant opening the monitor and turning something on.

The ThinQ account already holds the answer, and the bridge already reads it -
registrationPlan looks up the alias precisely so that registering an appliance does
not rename it. It just never went anywhere else. Keep the list, hand it to the
panel, and refresh it when the account changes: at startup, after logging in, after
registering an appliance, and on logout, which clears it by the same path.

Best-effort, and it costs nothing to an installation that does not use the bridge:
the names are what an account has to offer, so with no account linked - or none
configured at all - no row has one and the column is not drawn. An appliance the
account happens not to cover still shows a dash beside the ones that do have names,
where the column means something. A cloud that will not answer costs a log line and
leaves the names already on screen alone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…hone

Six columns, one of them a 36-character UUID, meant the panel scrolled sideways on a
phone - and the centred title in the navigation bar, which Materialize lets run past
the edge of a narrow screen, was pushing it further. Below the width where the
columns stop fitting, each row becomes a card instead: the name, model, platform and
id stack in one column, and the bridge switch and the monitor button stay pinned to
the right, where a thumb can reach them without a horizontal scroll first.

Nothing is dropped. The name and the id are cut off with an ellipsis rather than
wrapped - a UUID across three lines is no more readable than a truncated one - and
both carry their full text as a title, with the monitor page still showing the id in
full.

The monitor page had the same shape of problem one level down. Auto-scroll was
floated inside the "Messages" heading, which made the heading a layout container, so
a narrow screen dropped the float below it and split the switch: its name on one
line and its lever on the next. It sits in a row of its own now, as an inline-flex
unit that cannot be split, and the Off/On words either side of the lever are gone -
the lever's position already says which it is, and the words doubled the width.

Checked by rendering both pages against a stub at 390, 768 and 1200 pixels: the
document is exactly as wide as the viewport at each of them. The charset neither
page declared came out of the same exercise, where an em dash arrived as three
characters of mojibake.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@anszom

anszom commented Aug 4, 2026

Copy link
Copy Markdown
Owner
  1. I've cherry-picked the first commit.
  2. The second one (names) seems to rely on the "adopt existing devices" scheme you proposed (I still have to review that one, it's the most complex part). Otherwise, with the current bridge implementation, the ThinQ-side names will all be "Rethink xyzzy", and even if the user updates them, we only refresh on restart.
  3. The third commit is good to merge, but it depends on the second.

@3735943886

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing this.

Regarding the names (2): I expect most people will rename them. Anyone turning the bridge on is doing so to use the app, and the app is where the name needs to be readable. (I renamed all of mine too back when I used the upstream repo).

Regarding refreshing only at startup: Fair point, and I'd like to fix it in this PR if you don't mind. My preference is to trigger a refresh when the management panel is opened, or alternatively, we could add an explicit sync button with no auto-refresh, or simply drop the name feature altogether.

Let me know your thoughts.

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