qwen: scroll the chat with the keyboard and the mouse wheel #152
Open
nonos-sync
wants to merge 7 commits from
nonos-sync/gh-605 into main
AGit
pull from: nonos-sync/gh-605
merge into: NON-OS:main
NON-OS:main
NON-OS:starks/a47d23ae9
NON-OS:dependabot/github_actions/Vampire/setup-wsl-7.2.0
NON-OS:feat/toolkit-design-system
NON-OS:zen-brahmagupta-8b5esn
NON-OS:feat/browser-redesign-092
NON-OS:feat/ui-design-system
NON-OS:dependabot/github_actions/actions/upload-artifact-7.0.2
NON-OS:fix/nmi-unknown-source-lockfree
NON-OS:fix/607-fork-cow-refcount
NON-OS:fix/rng-fail-closed
NON-OS:fix/608-handoff-layout-asserts
NON-OS:fix/dev-attest-beside-production
NON-OS:feat/qwen-scroll-main
NON-OS:fix/606-cli-sti-memory-barrier
NON-OS:dependabot/github_actions/actions/download-artifact-8.0.2
NON-OS:dependabot/github_actions/actions/cache-6.1.0
NON-OS:fix/609-one-idt
NON-OS:test/review-fixes-integration
NON-OS:feat/qwen-scroll
NON-OS:dependabot/cargo/smallvec-1.16.2
NON-OS:dependabot/cargo/bitvec-1.1.1
NON-OS:dependabot/cargo/sha3-0.12.0
NON-OS:dependabot/cargo/x86_64-0.15.5
NON-OS:dependabot/cargo/curve25519-dalek-5.0.0
NON-OS:release/0.9.2
NON-OS:dependabot/github_actions/model-checking/kani-github-action-69d357bade1eb7b32bc3fc3d5c3d173c5bfa5237
NON-OS:fix/593-memory-confinement
NON-OS:install/first-boot
NON-OS:qwen/private-local
NON-OS:linux/sync
NON-OS:drivers/net-real-hardware
NON-OS:lean/substantive
NON-OS:feat/anyone-browser
NON-OS:linux/guest-files
NON-OS:linux/guest-sockets
NON-OS:linux/guest-memory
NON-OS:linux/go-std-suite
NON-OS:linux/guest-lifecycle
NON-OS:linux/next-waits
NON-OS:net/browser-private-networks
NON-OS:ui/shield-swap-terminal
NON-OS:ui/terminal
NON-OS:linux/go-guests
NON-OS:setup/wait-for-desktop
NON-OS:linux/store-install
NON-OS:amd/iommu-runtime-select
NON-OS:fix/extraction-after-merge
NON-OS:arch/aarch64-trap-names
NON-OS:arch/aarch64-wx
NON-OS:build/capsule-target-arch
NON-OS:fix/ct-and-align
NON-OS:verify/proof-closure
NON-OS:arch/aarch64-boot-log
NON-OS:arch/aarch64-el0-table
NON-OS:arch/aarch64-visibility
NON-OS:arch/aarch64-bringup
NON-OS:verify/lean-answer
NON-OS:fix/nym-no-clearnet-dns
NON-OS:iommu/snoop-and-bus-master
NON-OS:fix/pkcs1-digestinfo-prefix
NON-OS:fix/init-boost-irq-lock
NON-OS:integ/linux-finish
NON-OS:abi/caps-check-fail-closed
NON-OS:mk/host-accel
NON-OS:sign/local-signing-v2
NON-OS:crypto/zk-group-order
NON-OS:linux/frame-words-pid-arg
NON-OS:linux/signals-sockets
NON-OS:fix/terminal-vfs-startup
NON-OS:install/disk-installer
NON-OS:market/release-index
NON-OS:store/app-store
NON-OS:fix/gzip-trailer
NON-OS:usercopy/bounds
NON-OS:fix/foreign-thread-leak
NON-OS:fix/percpu-cpu-accounting
NON-OS:fix/interrupt-frame-offset
NON-OS:fix/aes-constant-time
NON-OS:nym/replay-window
NON-OS:asm/entry-surface
NON-OS:apps/process-manager
NON-OS:git-in-terminal
NON-OS:linux/threads
NON-OS:ci/dependabot-skip-production
NON-OS:process/accounting
NON-OS:paging/asid-flush
NON-OS:toolkit/theme-engine
NON-OS:linux/dynamic-linking
NON-OS:tls/alert-reasons
NON-OS:process/pid-reuse
NON-OS:caps/one-list
NON-OS:linux/file-layer
NON-OS:audio/shared-wire-format
NON-OS:crypto/rsa-scheme
NON-OS:process/foreign
NON-OS:fix/smp-safety-arc
NON-OS:anon/anyone-consensus
NON-OS:ci/one-run-per-branch
NON-OS:crypto/aes-software
NON-OS:build/esp-sequencing
NON-OS:inflate/gzip-members
NON-OS:ipc/service-allowlist
NON-OS:keyring/opcode-guard
NON-OS:linux/peer-boundary
NON-OS:linux/signals
NON-OS:security/image-ceiling
NON-OS:security/secureboot-anchors
NON-OS:sign/local-signing
NON-OS:proof/baseline-cpuinfo
NON-OS:proof/sysret-ss-rpl-bootmatrix
NON-OS:fix/fatal-faults-reach-serial
NON-OS:diag/trap-gdtr
NON-OS:fix/gpf-panic-serial
NON-OS:ci/boot-matrix-lane
NON-OS:ci/boot-matrix-diagnosable
NON-OS:docs/readme-and-run
NON-OS:attest/canonical-stark-crate
NON-OS:process/exit-diagnostics
NON-OS:apic/ipi-before-init
NON-OS:blk/rw-buffer-size
NON-OS:fs/blockfs-dirs
NON-OS:ci/no-stubs
NON-OS:hardening/iommu-and-smp
NON-OS:vault/keyring-wallet
NON-OS:crypto/out-of-ring-zero
NON-OS:process/inbox-names
NON-OS:abi/contract-gate
NON-OS:iwlwifi-gen3-prph-scratch
NON-OS:shell-backoff-and-ipc-bench
NON-OS:attest/ak-public
NON-OS:feat/files-backend
NON-OS:tools/guided-build
NON-OS:ci/proof-crates-serial
NON-OS:attest/receipt
NON-OS:hardening/mechanisms-that-were-off
NON-OS:drivers/conformance
NON-OS:drivers/i2c-proofs
NON-OS:crypto/remove-halo2
NON-OS:syscall/reach-fix
NON-OS:syscall/remove-mkspawn
NON-OS:ci/dark-features
NON-OS:ci/iommu-lane
NON-OS:syscall/reachability
NON-OS:smp/bring-up
NON-OS:desktop-ui-and-measurement
NON-OS:release/trust-reuse
NON-OS:feat/about-redesign
NON-OS:fix/release-gates
NON-OS:feat/terminal-rail-and-blocks
NON-OS:feat/proof-carrying-installer
NON-OS:release/inherit-secrets
NON-OS:release/attestation-surface
NON-OS:build/self-verifying
NON-OS:crown/net-desktop
NON-OS:stark/mount-unified
NON-OS:attest/export-and-dev-roots
NON-OS:stark/subgroup-closed-form
NON-OS:feat/nonos-docs-document-core
NON-OS:feat/calculator-restyle
NON-OS:feat/snake-arcade
NON-OS:arch/iommu-smp-gpu
NON-OS:consolidate/all-to-main
NON-OS:integration/production
NON-OS:feat/launchpad-restyle
NON-OS:feat/process-manager-restyle
NON-OS:feat/settings-restyle
NON-OS:caps/service-gate-binding
NON-OS:feat/paint-primitive-layer
NON-OS:feat/video-player-mvp
NON-OS:feat/display-fidelity-w2
NON-OS:abi/syscall-contract
NON-OS:libc/drop-retired-graphics
NON-OS:sdk/declared-capabilities
NON-OS:tls/certificate-basic-constraints
NON-OS:feat/display-fidelity-w1-desktop-aa
NON-OS:browser-engine
NON-OS:fix/third-party-app-launch-unblock
NON-OS:nym-bring-up
NON-OS:aarch64-capsule-boot
NON-OS:aarch64-bringup
NON-OS:Launchpad-Boot-Fixes
NON-OS:feat/hda-audio-playback
NON-OS:security/trusted-path-audit
NON-OS:ci-benchmark-disk
NON-OS:send-live-fees
NON-OS:shell-launch-toast
NON-OS:fix-multiwindow-drain
NON-OS:wallet-qr-receive
NON-OS:browser-layout-fixes
NON-OS:terminal-builtins-driver-probe
NON-OS:browser-image-keepalive-fix
NON-OS:stark-parallel-prover
NON-OS:std-pal-unmodified-tokio
NON-OS:stark-parallel-periodic-commit
NON-OS:feat/nox-pull-http-transfer
NON-OS:lean-verification
NON-OS:stark-recursion-assembly
NON-OS:stark-preprocessed-periodic
NON-OS:feat/wallet-nonos-design-reskin
NON-OS:stark-enrollment-tool
NON-OS:quickjs-browser-engine
NON-OS:wifi-stack-and-browser-engine
NON-OS:stark-shared-crate
NON-OS:stark-recursion-prod
NON-OS:lean-stark-attestation-proofs
NON-OS:feat/wifi-core
NON-OS:feat/image-viewer-capsule
NON-OS:wifi-mlme-supplicant
NON-OS:pr-device-bringup
NON-OS:iwlwifi-mlme-frames
NON-OS:mechanism-code-binding
NON-OS:Lean-Kernel-Proofs-To-Main
NON-OS:sync-primitives-proofs
NON-OS:repo-hardening
NON-OS:fix/installer-endpoint-collision
NON-OS:fix/installer-spawnbroker-cap
NON-OS:hardening/desktop-graphics
NON-OS:hardening/verification
NON-OS:hardening/apps
NON-OS:hardening/drivers-net
NON-OS:stark-poseidon-recursion
NON-OS:stark-money-grade
NON-OS:feat/terminal-shell-core
NON-OS:stark-lean-degree-bound
NON-OS:Stark-Kernel-Gate
NON-OS:Contributing-ZK-Refresh
NON-OS:Stark-300-Port
NON-OS:Stark-Land
NON-OS:Lean-Evidence
NON-OS:readme-proven-section
NON-OS:Stark-Per-Layer
NON-OS:Lean-Expand-To-Main
NON-OS:Stark-Wiring-Fuzz
NON-OS:Extraction-Regen
NON-OS:Lean-Spec-Coverage
NON-OS:Stark-Whole-Proof
NON-OS:Extraction-To-Main
NON-OS:Lean-Proofs
NON-OS:Stark-Monolith
NON-OS:Lean-Proofs-Expand
NON-OS:Stark-Recursive-Verifier-v2
NON-OS:Stark-Wired-Multi
NON-OS:Stark-Lookup
NON-OS:Stark-Fused
NON-OS:Stark-Multi-Trace-Api
NON-OS:Stark-Fri-Query
NON-OS:verify-proof-gates-main
NON-OS:Stark-Recursive-Verifier
NON-OS:Stark-Poseidon-Fri
NON-OS:Stark-Air-Sponge
NON-OS:Stark-Fri-Fold
NON-OS:revert-270-verification-foundation
NON-OS:Stark-Deep
NON-OS:Stark-Air-Poseidon
NON-OS:ci-verify-main
NON-OS:Fs-Hardening
NON-OS:Deps-Crossbeam-Advisory
NON-OS:verification-foundation
NON-OS:Stark-Fri-Proofs
NON-OS:Extraction-Proofs
NON-OS:Virtio-Net-Proofs
NON-OS:Stark-Proofs
NON-OS:Crypto-Proofs
NON-OS:Kernel-Isolation-Proofs
NON-OS:fix/crossbeam-advisory
NON-OS:Rtl8139-Proofs
NON-OS:Usb-Msc-Proofs
NON-OS:browser-render-fixes
NON-OS:Kernel-Proofs
NON-OS:Xhci-Proofs
NON-OS:E1000-Proofs
NON-OS:Verification-Docs
NON-OS:feat/clock-app
NON-OS:Virtio-Blk-Proofs
NON-OS:Nvme-Proofs
NON-OS:Usb-Proofs
NON-OS:Driver-Proofs
NON-OS:Net-Proofs
NON-OS:Boot-Proofs
NON-OS:browser-full-render
NON-OS:feat/ntp-time-sync
NON-OS:fix/prod-readiness-p0-p1
NON-OS:browser-ui-hardening
NON-OS:kernel-release-attestation
NON-OS:browser-network-hardening
NON-OS:network-browser-hardening
NON-OS:kernel-hardening
NON-OS:feat/netsurf-relibc-fork
NON-OS:ci/benchmark-artifacts
NON-OS:feat/net-core-smoltcp
NON-OS:feat/capsule-browser
NON-OS:bootloader-menu-policy
NON-OS:bootloader-anti-rollback
NON-OS:bootloader-tpm-status
NON-OS:bootloader-tpm-counter
NON-OS:bootloader-hardening
NON-OS:chore/bump-nonos-sign-v2
NON-OS:fix/wallet-tls-live-handshake
NON-OS:integrate/wallet-tls-into-main
NON-OS:feat/terminal-restyle
NON-OS:dev-enroll-bootstrap
NON-OS:bootloader-nonos
NON-OS:feat/terminal-tabs-and-blocks
NON-OS:feat/terminal-prod-readiness
NON-OS:feat/terminal-vt100
NON-OS:nonos-hardening
NON-OS:nonos/surface-vblank-phase-grid
NON-OS:nonos/syscall-bound-user-lengths
NON-OS:fix/preempt-transport-lock-deadlock
NON-OS:nonos/syscall-sleep-ms-getcwd
NON-OS:fix/net-dhcp-dns-crypto-cap
NON-OS:nonos/smp-apic-x2apic-ipi
NON-OS:nonos/input-key-release-target
NON-OS:nonos/mm-fault-budget-heap-guard
NON-OS:nonos/sched-percpu-correctness
NON-OS:perf/desktop-drop-demo-embeds
NON-OS:feat/net-control-op-auth
NON-OS:feat/net-security-wave1
NON-OS:feat/tcp-reliability-core
NON-OS:fix/net-l2-arp-eviction
NON-OS:fix/net-ip-reject-fragments
NON-OS:nonos/crypto-aead-wallet-tls
NON-OS:fix/virtio-net-rx-refill
NON-OS:fix/tcp-ack-acceptability
NON-OS:fix/net-l2-learns-ip
NON-OS:fix/microkernel-syscall-union-merge
NON-OS:nonos/kernel-thread-spawn
NON-OS:feat/dock-hover-reveal
NON-OS:nonos/std-platform-layer-complete
NON-OS:feat/tcp-rfc793-p0-p1
NON-OS:nonos/docs
NON-OS:nonos/desktop-shell
NON-OS:nonos/wallet
NON-OS:nonos/proof-capsules-v2
NON-OS:nonos/proof-capsules
NON-OS:nonos/std-library-expansion
NON-OS:nonos/kernel-process-args
NON-OS:nonos/std-platform-layer
NON-OS:feat/snake-game
NON-OS:nonos/runtime-stack
NON-OS:ek_gpu_scanout_clamp
NON-OS:ek_qemu_widescreen
NON-OS:ek_terminal_shell
NON-OS:feat/alive-system
NON-OS:ek_zk_production_enforce
NON-OS:feat/vfs-real-work-loop
NON-OS:fix/capsule-integrity-fixes
NON-OS:feat/boot-experience-splash
NON-OS:fix/keyboard-hvf-ps2
NON-OS:input-probe-harness
NON-OS:ek_boot_and_capsules_init/spawn
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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
NON-OS/nonos-micro-kernel!152
Loading…
Reference in a new issue
No description provided.
Delete branch "nonos-sync/gh-605"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Qwen chat window drew only the newest lines that fit (
qwenui_draw.cpp,from = lines.size() - fit). Earlier turns, and the start of any answer taller than the window, could not be brought back. This adds scrolling with the keyboard and the mouse wheel.Base is
main. This replaces #602, which targetedrelease/0.9.2before that branch was merged here (#601); the commits are the same five, cherry-picked onto main.What changes
Keys (qwen only). Up/Down move one line, Page Up/Down one page, Home goes to the oldest line and End to the newest. These keys already reached qwen as the NONOS codes
0x1201..0x1208, which the bridge forwards unchanged;window_keyjust never matched them. They are named inqwenui.h, hand-synced withapp_skeleton/src/input/keys.rs.One geometry for drawing and scrolling. Line building and the row count move out of
ui_drawintoui_lines/ui_fit. The painter andui_scroll_keyboth call them, so the scroll range is always the drawn range.View::backcounts lines up from the newest; at 0 the window behaves exactly as before.ui_fromclampsback, so a resize that shortens the history can't index past it.While loading or answering.
busy_stopused to keep nothing but Esc; it now gives every key toui_scroll_keyand redraws when the view moved. The error screen left by a refused model scrolls too. When scrolled up,to_windowadds tobackthe lines the streaming answer gained, so the text being read holds still. Sending a line,/resetand End all return to the newest.Wheel through the bridge (
capsule_linux). The bridge's input_router subscription now takesWheel(KINDS0x6B -> 0x7B). A guest holding awl_pointergets a verticalwl_pointer.axisfollowed byframe, at 10 surface units per notch, clamped toapp_skeleton::scroll::MAX_NOTCHES. The sign is flipped: Wayland's positive is toward the end, NONOSdelta_y's is toward the top.Wheel in qwen. qwen now also does
wl_seat.get_pointer, under a new idPTRappended after the others so no existing id moves. A vertical axis becomes aKeycarrying notches; a nonzero value smaller than one notch counts as one. Horizontal axis, zero values and the pointer's enter/motion/button/frame events produce nothing. Scrolling is 3 lines per notch, as inapp_skeleton::scroll::WHEEL_LINES.Hand-synced numbers
wl_seat.get_pointer= 0:ops.rs<->qwenwl_open.cppwl_pointer.axis= 4, axis 0 = vertical, 10 units per notch:input_send.rs<->qwenwl_loop.cpp0x1201..0x1208:app_skeleton/src/input/keys.rs<->qwenui.hNot changed
Testing
make nonos-mk-qwenscroll-check NONOS_LINUX_GUESTS=1 NONOS_QWEN=1is a new host check. It covers:ui_fromclamping, including the resize-shrink case;wl_polldecodingwl_pointer.axisover a socketpair.It has been shown to fail when
WHEEL_LINESor the sub-notch rule is broken.The existing
qwenresize_checkstill passes.On macOS both qwen checks build only with a test-only
memfd_createshim, which is not in the tree. The make targets themselves have not been run on a Linux host.On
main@514cfd078:cargo check --release --target ../x86_64-nonos-user.json -Zbuild-std=core,alloc -Zbuild-std-features=compiler-builtins-meminuserland/capsule_linuxgives 0 warnings, andrustfmt --checkis clean.make dev-imagebuilds. The stagednonos.imgcontains the new qwenchat binaries byte for byte.make dev-bootboots clean (Handoff OK, boot attest enrolled, capsules spawned) and Qwen loads its model.Scrolling has not yet been confirmed on a running system. Overflow the chat, then try Page Up/Down, Up/Down, Home/End and the wheel, including while it answers.
Opened on GitHub by senseix21 as pull request 605. Review and merge happen there while this repository is kept in step from GitHub; this copy follows it, and is marked merged or closed when it is.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.