Repository navigation
Add a view-only live view member profile - #493
Merged
Merged
Conversation
masnwilliams
force-pushed
the
hypeship/live-view-viewer-profile
branch
from
October 27, 2026 21:47
26dda8e to
b6cca85
Compare
masnwilliams
force-pushed
the
hypeship/live-view-viewer-profile
branch
from
November 2, 2026 17:54
b6cca85 to
8275e93
Compare
tnsardesai
approved these changes
Nov 4, 2026
tnsardesai
left a comment
Contributor
There was a problem hiding this comment.
fyi, remember to merge kernel/neko#30 first and update this version (images/chromium-headful/Dockerfile:L165, currently 3.0.8-v1.6.4-rc.1) before merging.
Follow-ups
- Follow-up bug — read-only links will never connect on GPU browsers —
PR-level(kernel-images-privateshared/gpu/neko.yaml)- Problem:
Dockerfile.gpuin kernel-images-private overwrites/etc/neko/neko.yamlwithshared/gpu/neko.yaml. That file still hasuser_password: "neko"and the user profile that can take control, and syncing this PR doesn't touch it. - Impact: once kernel/kernel#5042 ships,
readURLs for GPU browsers load the page, but the stream never connects. - Fix: apply the same
user_passwordanduser_profilechange toshared/gpu/neko.yamlduring the private sync, and add that step to #5042's merge order before #5042 merges.
- Problem:
masnwilliams
added a commit
to kernel/neko
that referenced
this pull request
Nov 6, 2026
## Summary Refuse input from sessions whose member profile doesn't have host permission (`can_host: false`), so a view-only member can watch without controlling the desktop. - `LegacyIsHost()` returns `false` when the profile can't host. Otherwise it keeps its existing behavior: true under implicit hosting, or when the session is the host. - `clipboardSet`, `keyboardMap` and `keyboardModifiers` require `can_host` (clipboard set also requires `can_access_clipboard`). - `controlRelease` requires `can_host`. The checks use the profile's `can_host` rather than `IsHost()`, because with legacy implicit hosting a session that may control isn't necessarily registered as the host. Sessions that can host behave as before, including the default admin and user profiles. ## Tests New unit tests: - `internal/session`: `LegacyIsHost` with and without implicit hosting, for profiles that can and can't host. - `internal/websocket/handler`: a session without host permission is refused for control request/release, move, key press, clipboard set, keyboard map and keyboard modifiers, with no desktop calls and no host change. A host-capable session still reaches the desktop for each. - `internal/webrtc`: legacy data-channel move, key down and button down are dropped for a session without host permission and applied for a host-capable one. `go vet ./internal/...` and `go test ./...` pass in the server build image. ## After merging Publish `v3.0.8-v1.6.4` from `master`. kernel/kernel-images#493 is on the `v3.0.8-v1.6.4-rc.1` release candidate built from this branch and will be bumped to the final tag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a view-only Neko member profile for read-only live view links.
ghcr.io/kernel/neko/base:3.0.8-v1.6.4, which includes Refuse input from sessions without host permission neko#30 (members without host permission don't send input, clipboard or keyboard changes) and Generate screen modes at the exact requested size and refresh rate neko#31 (screen modes generated at the exact requested size and refresh rate).neko.yaml: the multiuserusermember becomes a view-only profile (can_host,can_share_media,can_access_clipboard,sends_inactive_cursorandis_adminall false) with its own password, used by the live-view proxy for read-only links.window.KERNEL_LIVE_VIEW_READ_ONLY = true, the viewer starts read-only and answersKERNEL_SET_READ_ONLYunlock requests withreadOnly: true, so it doesn't offer controls the member can't use. Without the flag, behavior is unchanged.The admin member and the default live view behavior are unchanged.
Before merging
kernel/neko#30 and kernel/neko#31 are merged, and
v3.0.8-v1.6.4is published from nekomaster. This PR now uses that final tag.Testing
bun test testsin the client: 262 pass on currentmain, including new cases for read-only links.vue-cli-service buildsucceeds; lint has no new warnings.Note
Medium Risk
Touches live-view input policy, NeKo credentials, and display sizing semantics via a base-image bump; misconfiguration could affect who can control sessions or odd-width resize behavior.
Overview
View-only live view pairs a dedicated Neko member profile with client logic so read-only links stay read-only even when parents ask to unlock.
The Docker/NeKo stack bumps the NeKo base image to
3.0.8-v1.6.4and reshapesneko.yaml: the non-admin member uses passwordlive-view-read-onlyand has hosting, media, clipboard, and inactive-cursor sending disabled—matching a view-only account the live-view proxy can use.The viewer declares
window.KERNEL_LIVE_VIEW_READ_ONLY, addsresolveReadOnly()so URL params andKERNEL_SET_READ_ONLYpostMessages cannot leave read-only mode when that flag is true, and documents the contract in the README. Tests coverresolveReadOnlyand the e2e odd-width display test is renamed and updated to expect the X root and API response match the requested width (1365×768), reflecting NeKo’s exact-size modes instead of libxcvt rounding.Reviewed by Cursor Bugbot for commit b265c4b. Bugbot is set up for automated code reviews on this repo. Configure here.