openvibers/openvibe.shared Commits

Shared 4.2.0: Ask Actor in the account menu (the page's selection into Actor's console) (#78)

OP OpenVibers committed 29 days ago · tag v4.2.0 · 0 files, +0 −0

"Ask Actor" in the account menu: the OpenVibe Frame's button (plan T17), on every site that uses the shared navbar.

- When the person is signed in, the You section has **Ask Actor** after Notifications.
- It opens `https://openvibe.actor/console?ask=<selection>&from=<page>`:
  - the ask is the text selected on the page, up to 1000 characters, spaces folded;
  - the from is the page's https address, without its hash, up to 400 characters.
- Actor's console (Actor#79) fills its command box from these and runs nothing until the person presses Run it.
- With nothing selected, it opens the plain console.
- The selection is read on `pointerdown` on the avatar, because the press itself can clear it, and again on click for keyboard opening.
- Signed out, the link is not shown. `menu: { defaults: false }` hides it with the other defaults.
- `fa-brain` becomes a built-in glyph (`scripts/build-navbar-icons.js`).
- The navbar's brotli budget goes from 30 to 31 KB: main measured 29.98 KB, and this measures 30.6 KB.

`test/navbar-ask-actor.test.js` checks two things:
- **In plain node:** the link (plain console, ask, from without the hash, a long address and a non-https page left out).
- **In headless Chrome:** signed out there is no link; signed in with nothing selected it opens the plain console; with text selected, a real mouse press on the avatar carries the selection into the link and opens the menu.

The full suite passes (59/60, floating-promises skipped locally as usual).

This commit has no diff to show.