Commit Graph
78 Commits
Author SHA1 Message Date
lotherk 2428bf1052 dtchat: verify adapter files whose hash arrives at the end (T4.5)
Telegram and WhatsApp learn a document's SHA-256 only when the transfer is
finished, so their file-offer carries none and the digest comes with
file-end.  The UI used to verify only the offer hash, which meant those two
paths wrote the bytes unchecked.  accounts_run now takes the offer's hash
when there is one and the file-end's otherwise, hashes the .part file after
the last chunk and renames only on a match; a mismatch still removes the
part file and reports it in the status line and the transcript.

The fake adapter gained the matching modes: latehash offers without a hash
and sends the right one in file-end, badendhash sends a wrong one there.
tests/file_ui.sh drives all four shapes through the real UI under its own
Xvfb with DTCHAT_TEST_FILE_ACCEPT: files and latehash write the verified
hello world, badhash and badendhash are rejected and leave neither the file
nor a .part.  Measured with the built binaries: four ok, exit 0.

Harness entry DtChat/file_ui added; the full run is 53 ok/0 bad
(make mcde-host exit=0, build/logs/mcde-host-2026-11-17-endhash.log).
2026-11-17 13:08:55 +00:00
lotherk 62d7323df2 dtchat: exercise WhatsApp incoming files with a real fake file (T9.1)
DTCHAT_WHATSAPP_FAKE_FILE makes the fake adapter offer that file (name, size, SHA-256), and on file-accept read it in 4 KiB blocks, emit file-data and a file-end carrying the hash; the real accept path (DownloadAny) now also sends the SHA-256 in file-end, and the static fake keeps its hello-world hash. tests/whatsapp_fake.py uses a 9000-byte deterministic file, checks the offer name/size/hash, reassembles every chunk byte-for-byte and verifies the file-end hash (31 checks, green stand-alone). Harness entry already exists; in-tree build and harness follow.
2026-11-17 12:29:27 +00:00
lotherk 1480b67f1f dtchat: make the account editor persistent (T2.4)
The dialog now edits real accounts instead of in-memory demo entries: the schema is Label, Protocol (irc/xmpp/telegram/whatsapp/demo), Adapter path, Settings (JSON) and Secrets (JSON). It loads accounts.json/secrets.json through the runtime (label, protocol, adapter, settings, masked secrets), and Save builds the complete accounts/secrets documents for every account, extracts label/protocol/adapter and parses the two JSON fields, then calls the runtime's writer. The runtime saves via dc_store_save_accounts/_secrets (files 0600), swaps its stored JSON, removes deleted accounts from the model, and restarts all adapters from the new set; the UI data pointers are refreshed. Add/Delete/Save semantics are now file-backed. Verified through the real UI under Xvfb: Add filled (Label 'Fake via UI', adapter /tmp/opencode/fake_adapter, settings {"mode":"echo"}), Save wrote both files (0600) and started the fake adapter online; restarting dtchat shows the account and all fields again (screenshots dtchat-accounts-editor.png, dtchat-accounts-loaded.png). In-tree build and harness follow.
2026-11-17 12:23:15 +00:00
lotherk 468be523ab dtchat: download accepted Telegram documents (T8.1)
An incoming messageDocument is remembered with its TDLib file id; file-accept sends downloadFile (priority 1, whole file) and updateFile is followed until local.is_downloading_completed, then the local file is read in 4 KiB blocks and sent as file-data with a file-end carrying the SHA-256 computed with dc_file_sha256. Unknown offers answer file-error. The fake mode can offer a real local file through DTCHAT_TELEGRAM_FAKE_FILE and exercises the same read/hash/chunk/event path; tests/telegram_fake.py now uses a 9000-byte file, checks the offer size and SHA-256, reassembles the chunks byte-for-byte and verifies the file-end hash (25 checks, green stand-alone). The adapter links CRYPTOLIB for EVP/dc_file_sha256. The TDLib downloadFile/updateFile branch is compiled but not exercised without an account. Full build and harness follow.
2026-11-17 12:12:44 +00:00
lotherk 71718ce00f dtchat: verify adapter files with SHA-256 (T4.5)
The file protocol now carries the sender's SHA-256: the adapter computes it with dc_file_sha256 for an outgoing transfer, puts it into the IBB open metadata (urn:dtchat:file:0 sha256 attribute) and into file-sent, and passes the attribute of an incoming open through in file-offer. The UI stores the offered hash, hashes the part file at file-end and only renames when it matches; a mismatch removes the part file, reports 'file rejected: checksum mismatch' in the status line and the transcript, and never exposes the bytes under the final name. The fake adapter offers the correct hash in mode files and a wrong one in mode badhash. tests/xmpp_ibb.py checks the SHA-256 in the outgoing open and in the incoming offer. Verified stand-alone under Xvfb: mode files writes the 11-byte hello world, mode badhash leaves no file and no .part; the XMPP IBB suite passes with the hash checks. In-tree build and harness follow.
2026-11-17 11:13:07 +00:00
lotherk 59f6453d5e dtchat: wire adapter file offers into the UI (T4.5)
accounts_run.c handles file-offer/file-data/file-end/file-reject/file-error: an offer creates the conversation and opens the existing file dialog, accepts send file-accept and write the base64 chunks into NAME.part (0600) in the state directory, file-end renames to a free name and adds a system line to the transcript, a reject sends file-reject and removes the part file; a file-sent confirms our own transfer. The runtime sets the UI file hook, so Conversation > Send File now works for an adapter account: send_file_cb falls back to the open conversation when there is no Nearby peer, and the hook sends file-send with the generated id. dc_adapter_send_file()/dc_adapter_file_answer() are the core side. The offer dialog was only 128x52 because its shell size was overridden before the popup; it now sets form and shell and repeats after 50 ms, and the timer is removed on destroy. The fake adapter gained a 'files' mode (offer, data, end on accept, reject on reject, file-sent on send). Verified under Xvfb: offer dialog 460x190, Accept by click writes hello world (11 bytes), Reject leaves no file, and DTCHAT_TEST_UI_SEND_FILE produces file-send/file-sent; screenshots build/mcde-shots/dtchat-file-offer.png and dtchat-file-received.png. In-tree build and harness follow.
2026-11-17 11:04:19 +00:00
lotherk c0ad65b394 dtchat: file transfer over XMPP IBB (T4.5)
The adapter protocol gains additive file events: file-send (conv, id, name, path), file-accept/reject/cancel commands, and file-offer/file-data/file-end/file-sent/file-reject/file-error events, with a 32 MiB limit, 4 KiB blocks and an explicit accept before data flows; docs/reference/dtchat-adapter-protocol.txt defines them. xmpp_adapter.c implements XEP-0047: outbound open (with the name/size in a urn:dtchat:file:0 child), base64 data IQs acknowledged one by one and close, then file-sent; inbound open is held until file-accept answers the IQ, data chunks become file-data events, close becomes file-end, and a reject is an IQ error. libstrophe serialises a tag's text through a separate text stanza (set_text on a named tag returns -2), which the data blocks now do. tests/xmpp_ibb.py drives a minimal server: outgoing bytes arrive unchanged, an accepted incoming file yields offer/data/end with the right size, and a rejected offer becomes an IQ error; all 26 checks pass, exit 0, no stderr. The UI file path for adapter accounts (offer dialog, accept, writing the chunks) is the next piece; the adapter itself is complete.
2026-11-17 10:46:04 +00:00
lotherk d3cbb6c745 dtchat: run the configured accounts as adapters in the UI
accounts_run.c loads accounts.json (id, protocol, label, adapter, settings, enabled) and secrets.json (per account id) and starts one DcAdapter per enabled account, pumping the DcLoop from an Xt timeout. Its events go into the model and the panel: state into the status line, conversation (direct/channel/group) and roster entries into the model (roster sets presence), messages into the transcript via dtchat_ui_message_added, presence/typing/errors into the status/dialog, request events into the existing request dialog with the answer routed to that adapter. The UI send hook resolves the selected account (dtchat_ui_current_account) or the account that owns the conversation and calls dc_adapter_send_text; dtchat_accounts_join/_typing expose join and XEP-0085 for menus and tests. Normal GUI runs (not --demo/--local/--perf/--smoke) start with an empty model and the configured accounts; the demo peers are gone in that mode. dtchat-irc is installed next to dtchat and listed in the PLIST; dtchat-xmpp and the demo adapter remain build artifacts. Verified with the fake adapter under Xvfb (accounts fake: starting/online/sent alice/message alice), including the real UI send path (DTCHAT_TEST_UI_SEND), screenshot build/mcde-shots/dtchat-accounts.png; --smoke-test still passes.
2026-11-17 10:22:27 +00:00
lotherk 5a3b62283a dtchat: add XMPP MUC rooms (T4.4)
join sends a presence to room/nick with the http://jabber.org/protocol/muc <x/>; the room's self-presence is answered with a conversation event (kind group, title room), other occupants are reported as presence events with buddy=room/nick, groupchat messages are filed under the room with the sender's nick in from, and part sends an unavailable presence. The nick is the JID's local part. The hello caps gain muc. tests/xmpp_muc.py drives a minimal server through stream, SASL PLAIN, bind, join (checks the MUC element), self-presence, alice's presence, a groupchat message and the part; all 17 checks pass, exit 0, no stderr. UI wiring for adapter accounts is still open, as is the live test.
2026-11-17 10:02:33 +00:00
lotherk c772f3a0d9 dtchat: add XMPP carbons and chat states (T4.3)
After the bind the adapter enables XEP-0280 carbons and unwraps sent/received forwarded messages: a message another of our resources sent becomes a normal message event with self=true and the contact as conv, a received one self=false. XEP-0085 chat states are handled before the body: composing emits typing on, paused/active/inactive/gone off. The typing command sends composing or paused to the conversation, and dc_adapter_send_typing() puts it on the core side. tests/xmpp_fake.py checks carbons were enabled, the forwarded message (self, conv bob, text), typing on/off from bob, and that a typing command reaches the server as <composing> addressed to bob. Standalone adapter: all checks ok. The UI does not send typing for adapter accounts yet (adapter account wiring is still open), which the commit documents.
2026-11-17 09:56:18 +00:00
lotherk 245c5cea8d dtchat: add the XMPP roster and presence (T4.2)
After the bind the adapter sends <presence/> and asks for the roster (iq get, jabber:iq:roster) and handles the result and pushes: every item becomes a roster event with the contact's id, name, subscription and current online state. Presence from contacts is tracked per bare JID and emitted as presence events (online with the XMPP show and status, offline, subscribe/unsubscribe); libstrophe 0.14's get_text is used for child text. The hello caps gain roster and presence, and the event shapes follow docs/reference/dtchat-adapter-protocol.txt (buddy, contact, away). tests/xmpp_fake.py now checks that the client announces itself and asks for the roster, delivers bob (name/subscription) and carol, the online-with-show/status and offline presence, and still carries messages both ways. Run against the standalone adapter: 22 checks, all ok. In-tree build pending: make mcde-host is running after the configure change.
2026-11-17 09:48:58 +00:00
lotherk 4c1063b5ba dtchat: camera capture, VP8 on the call and a real video picture (T7.1)
media_capture.c: V4L2 (YUYV, 4 mmap buffers, poll, QBUF again after use) and a
test pattern; a camera with another size is scaled to the call's 640x360, and a
build without HAVE_V4L2 gets the pattern. On this T14 the integrated camera is
/dev/video0 and gives frames (test_capture: v4l2:/dev/video0, non-uniform
frame, 320x180 through the scaler; pattern frames differ and have Y and
chroma). configure defines HAVE_V4L2 for linux/videodev2.h.

media_video.c gains dc_vpx_enc_keyframe (VPX_EFLAG_FORCE_KF on the next
frame), media_packet a DC_MEDIA_KFREQ control, media_call
dc_call_request_keyframe/take and DC_MEDIA_KFREQ in the sealed type range.
dc_call_video_out now decodes the reassembled VP8 frame into I420 (it returned
the compressed frame, which the UI drew as a green picture);
dc_call_video_packet keeps the compressed frame for tests and recordings.
Video timestamps are wall clock, not frame counts, so a pump slower than 15 fps
does not drift behind the audio clock.

localui starts camera+encoder on entering the call, sends 15 fps, requests a
keyframe after a loss, forces one when asked, decodes incoming frames into the
call window, drains up to four 20 ms capture frames per 40 ms pump (one per
pump halved the audio clock), and logs video in/out under
DTCHAT_CALL_DEBUG; DTCHAT_TEST_VIDEO switches to the pattern.

Two UIs under Xvfb: A pattern, B camera, 90 frames each way in about 6 s,
audio 300 frames (real time), the window shows the peer's picture
(build/mcde-shots/dtchat-t71-video-call.png). test_video_packet uses the
packet interface; its 50 KB/42-fragment loopback check still passes. New
harness entry DtChat/test_capture (43). In-tree build pending: a foreign
make release holds the lock.
2026-11-17 09:19:48 +00:00
lotherk 254faf7d33 dtchat: exchange media keys and wire live calls into the UI (T6.5)
The local protocol gets media-key: each side sends its ephemeral X25519 public key (base64) and UDP port over the ready text connection; both derive the direction keys with HKDF-SHA256, the caller is the initiator. localui sends the key on Conversation > Call, answers an offer with its own key, creates the call with dc_call_new_bound on the listener port (TLS and media share the number), rings, and opens the call window; an incoming ring enables Answer. The Xt loop pumps the call: drain, Opus decode to the playback stream, capture and encode only while our own PTT is held, video frames to the window, ring timeout. dc_local_conn_remote_addr gives the numeric peer address; dc_call_new_bound binds the announced port. dc_call_talking() is now only our own key, dc_call_peer_talking() the peer's (a received PTT used to start our microphone too). The call window has an Answer button and lays the buttons above the video so they stay visible. --call-first and DTCHAT_TEST_TRUST/DTCHAT_TEST_AUTOANSWER/DTCHAT_TEST_PTT drive the test: two UI instances auto-paired, exchanged media-key, rang, answered, reached IN_CALL and carried 200 Opus frames caller->callee with the callee silent (audio out 200 on the receiver, audio in 200 on the sender); screenshot build/mcde-shots/dtchat-t65-live.png. The smoke still passes; test_media_call uses peer_talking; test_media_packet covers the base64 key exchange. The test switch is documented in the security review.
2026-11-17 08:49:25 +00:00
lotherk 3e16dea795 dtchat: bind local identities to their keys and gate files on pairing (T10.2)
Security review findings: (1) the local peer identity was only a claimed pin; the listener now requests the client certificate and compares the certificate hash that completed the handshake with the pin in hello, refusing a mismatch or a missing certificate, and the client presents its identity certificate (test_local uses real identities: matching, other identity, any). (2) unpaired peers could send file offers; the UI manager carries a paired flag, answers offers from unpaired peers with file-reject 'pairing required' and refuses to send. The review document lists both fixes and the accepted limits (no passphrase, public pins, media nonces later, adapter spawn, file names, QR, parser limits). Standalone: test_local, test_filexfer, tests/p2p.sh and the UI pairing/message run pass with the changes. The in-tree build is pending because another release chain holds the lock (pid 4040149).
2026-11-17 06:49:35 +00:00
lotherk 5d11b79269 dtchat: document the local peer protocol
Normative description of the LAN transport: TLS with the identity certificate, TOFU pin and 6-digit SAS, hello/hello-ack, presence/msg/msg-ack/typing, file-offer/data/end/done/cancel with 64 KiB chunks and the 512 MiB limit, reconnect backoff and the peers.json pin store. Aligned with local.c, filexfer.c, pair.c and headless.c; the file dialogs are the remaining part of T5.8.
2026-11-16 20:51:22 +00:00
lotherk 838d6f0de7 dtchat: document the adapter protocol v1 (T1.7)
Normative contract for the stdio JSON-line adapters: framing, lifecycle, hello and settings schema, core commands, adapter events, request/answer, error/fatal, bye, versioning, security, IRC and QR examples. Aligned with adapter.c, fake_adapter.c and test_adapter.c; hello timeout now 10 s.
2026-11-16 17:49:13 +00:00
lotherk b8d58fb11a dtchat: pair local peers with a SAS code
Documents the decision recorded as t0360: first contact shows a 6-digit code derived from both certificate hashes and a nonce; only after the people compare it is the pin stored. Unpaired peers may send a text request only; a changed pin blocks until re-pairing.
2026-11-16 17:01:25 +00:00
lotherk d283c85767 dtchat: TDLib 1.8.70 tdjson spike on Linux (T0.7)
TDLib builds with -DTD_ENABLE_JNI=OFF; libtdjson.so.1.8.70 is 50 MB and the build tree 537 MB. tdjson_spike starts a client without an account and getOption(version) answers 1.8.70; the authorization state is waitTdlibParameters. NetBSD is still open, so the Telegram package is Linux-first and a release gate.
2026-11-16 16:47:07 +00:00
lotherk f8b04beec1 dtchat: start the TDLib build (T0.7)
Records the exact cmake invocation, the -j4 choice and the current 48% state in /home/lotherk/tmp/dtchat-tdlib/td/build; go/no-go and the NetBSD attempt are still open.
2026-11-16 16:27:04 +00:00
lotherk fe6b91e088 dtchat: review the Phase 0 spikes so far (T0.9)
ADR and C5 now record: libtls and DNS-SD verified on Linux (NetBSD runs open), libstrophe TLS/SASL/message verified, ALSA 48k/20ms duplex verified, whatsmeow builds and emits a QR event, TDLib still building. Phase 1 proceeds on Linux; NetBSD validation is a release gate; PTT stays default; Telegram/WhatsApp remain conditional and call-less in v1.
2026-11-16 16:26:12 +00:00
lotherk ccbb275e86 dtchat: whatsmeow QR-flow spike (T0.8)
whatsmeow v0.0.0-20261116124925 and Go 1.27 build with cgo sqlite3; sqlstore + GetFirstDevice + GetQRChannel + Connect produce a 277-character QR code and a 160 KB session DB. Login and message need a spare account, so the task is paused.
2026-11-16 16:24:23 +00:00
lotherk aa6ed2ccc3 dtchat: 48 kHz/20 ms duplex audio spike on ALSA (T0.6)
ALSA default opens capture and playback simultaneously at 48k S16_LE mono with 960-frame periods and a 3840-frame buffer; 48000 frames in 1.013 s. The one-period loop underruns playback, so the real path needs a pre-filled ring buffer. hw:0,0 rejects the config; default is the entry point. NetBSD audio(4) not run; PTT stays the v1 default.
2026-11-16 16:19:47 +00:00
lotherk a89ae1a9ba dtchat: libstrophe STARTTLS/SASL/message spike (T0.5)
libstrophe 0.12.3 against a minimal fake XMPP server: TLS 1.3, SASL PLAIN, bind, session and an incoming message through xmpp_run_once() in a poll-style loop. Build needs -Wno-error=incompatible-pointer-types on GCC 16. xmpp_stanza_get_text_ptr() is the wrong accessor for element text; use xmpp_stanza_get_text() and free it.
2026-11-16 16:17:50 +00:00
lotherk ade7f3049b dtchat: DNS-SD spike on Avahi (T0.4)
_dtchat._tcp registers and resolves on IPv4/IPv6, TXT survives, the service disappears after exit. pkgsrc's avahi installs avahi-client but not the libdns_sd compat library, so the Linux backend uses avahi-client; NetBSD keeps libdns_sd. NetBSD runtime not measured.
2026-11-16 16:13:25 +00:00
lotherk dce624b11f dtchat: TLS spike on Linux, NetBSD run open (T0.3)
libretls 3.8.1: non-blocking handshake with poll, system-CA verification, self-signed rejection and a TOFU pin that matches openssl's SHA-256. NetBSD had no reachable host; the exact command and the open point are recorded in docs/reference/dtchat-spikes.txt.
2026-11-16 16:11:04 +00:00
lotherk 712d066c09 dtchat: record upstream API findings (T0.2)
Adds docs/reference/dtchat-upstream.txt with the quoted sources for libtls, libstrophe, TDLib, whatsmeow, DNS-SD, Opus, VP8, XMPP and the media crypto. Corrects the ADR: TDLib does expose call signalling (createCall/acceptCall/sendCallSignalingData/discardCall), but the media stack is the separate tgcalls; whatsmeow lists Calls as not implemented. libstrophe 0.12.3 has no MUC module; xmpp_run_once exists. DNS-SD uses txtvers, not v.
2026-11-16 16:08:02 +00:00
lotherk 15f695f874 mcde: allow dtchat's TLS, XMPP and codec libraries
dtchat needs libtls, libstrophe, libopus and optional libvpx; record the exception in AGENTS.md, the decision in docs/reference/dtchat-architecture.txt, and the program in docs/MCDE-PROGRAMS.md (C5). Tasks: tasksd scope mcde/dtchat.
2026-11-16 15:57:46 +00:00
lotherk df64a5b693 docs: remove remaining stale overlay/patch 0009/0005 references (t0085) 2026-11-15 15:54:58 +00:00
lotherk 129222a556 docs: remove dead overlay/patch references from build docs, install media and tools (t0085) 2026-11-15 15:52:48 +00:00
lotherk d17ad7a219 docs/reference/sysupgrade.txt: the 2026-11-14 reading put back, a measured section added (t0055)
My commit e52d511ec0 replaced this file instead of adding to it: `ls
docs/reference | head -40` had cut the list before this name, so I took it for
new and wrote over 211 lines of saved reading.  docs/reference/AGENTS.md is
explicit ("Correct a file by a dated note, not by silent rewriting"), so this
restores the file byte for byte from e52d511ec0^ (verified: the diff against
that commit is 53 insertions, 0 deletions) and appends what was measured
today, as section "2026-11-15: measured in this tree".

The measurements, each with its line:
- `config(1)` is comp-obsolete in this tree (src/distrib/sets/lists/comp/
  mi:4719-4720) and absent from the destdir, so KERNEL=AUTO does not merely
  "need config" -- sysupgrade stops with "Failed to determine kernel name".
- The set carries only share/examples/sysupgrade/default.conf; the
  /usr/pkg/etc/sysupgrade.conf of CONF_FILES (recipe:26) is a pkg_add action
  and shtk_config_load is fatal on a missing file
  (share/shtk/config.subr:176-181): the upgrade command must pass -c.
- pkgsrc's default.conf names the NetBSD daily snapshots, not our source.
- The release's 24 *.tar.xz sets match pkgsrc's ARCHIVE_EXTENSION (tar.xz on
  x86_64), no override needed.
- /usr/pkg/sbin/sysupgrade (17447 bytes) and shtk are in the destdir -- the
  NetBSD binary of packages.list:48.
- The package's cache is /var/cache/sysupgrade (recipe:18-20).
- No set is verified (ftp(1), tar -xp); t0078.
2026-11-15 09:04:46 +00:00
lotherk e52d511ec0 docs/reference/sysupgrade.txt: what sysupgrade 1.5 does on this tree (t0055)
packages.list:46-48 takes sysutils/sysupgrade as a binary of the makronix
set and names docs/reference/sysupgrade.txt as the reading behind it, and
docs/reference/AGENTS.md lists the file too; neither existed.  This is the
reading, done in the distfile sysupgrade-1.5.tar.gz (build/distfiles) and
pkgsrc's three patches, with the claims measured in the tree.

What it settles for t0055:
- RELEASEDIR is the architecture directory of a release (it fetches
  binary/sets/<set>.<ext> and binary/kernel/netbsd-<KERNEL>.gz under it), so
  build/obj/releasedir/amd64, not the sets directory; the sets there are
  *.tar.xz and pkgsrc's ARCHIVE_EXTENSION is tar.xz on x86_64.
- file:// is not an accepted form: an absolute path, ftp://, http://, ssh://
  (and https:// through pkgsrc's patch).  Our command has to translate
  file:///DIR to /DIR.
- KERNEL=AUTO needs config(1), which is comp-obsolete in this tree
  (src/distrib/sets/lists/comp/mi:4719-4720) and not in the destdir: it
  fails, it does not skip; KERNEL must be explicit (GENERIC on amd64).
- SETS=AUTO takes /etc/mtree/set.*, and set.makronix is one of them: the
  makronix set is fetched and unpacked with the base system.
- The configuration file does not exist on an installed system: the set
  carries share/examples/sysupgrade/default.conf, the CONF_FILES copy to
  /usr/pkg/etc/sysupgrade.conf is a pkg_add action, and shtk_config_load
  stops when the file is missing.  The command of t0055 passes -c its own.
- Nothing verifies a set (t0078's subject).

Also recorded as makronix wiki entry e00012.
2026-11-15 09:03:42 +00:00
lotherkandClaude Sonnet 5.5 55a9319ac4 keytest: Ctrl+Up, zones, Shift+Cmd+Tab, the screenshot key, Option+Cmd+H/M/W; table of 2026-11-15 completed (t0058)
All seen except: Shift+Cmd+3/4 do nothing because there is no dtscreenshot (t0222),
Ctrl+F2 is not bound (t0221), Option+Cmd+W not judged (the windows were minimized by the step before).
build/logs/mcde-keytest-2026-11-15d.log exit=0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 06:00:01 +00:00
lotherkandClaude Sonnet 5.5 0290af4d9e sys.dtwmrc.tmsg de_DE, es_ES, fr_FR: the key lines were cut off by quoting (t0058)
Merged with the project's tool (programs/localized/util/merge, LC_ALL=C.UTF-8),
de_DE and es_ES lost F8-F11, Ctrl+Up and all lines after them because message 11
closed its quote after the F10 line; de_DE, es_ES and fr_FR lost every line
after the first f.exec "..." because the inner quotes were not escaped.  Both
fixed; all 11 locales now merge with rc=0 and no message, and the Keys sections
carry the same 56 MCDE key lines as C.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 05:57:39 +00:00
lotherkandClaude Sonnet 5.5 7f2453a8b3 MCDE shortcuts: Command+Tab is the program switcher in sys.dtwmrc too; the keytest presses plain keycodes and the table of 2026-11-15 (t0058)
4affe0dc00 changed the compiled-in key table (WmResource.c) but not the
sys.dtwmrc.tmsg files, so a session bound Cmd+Tab to f.next_key (window cycling)
and Shift+Cmd+Tab to f.prev_key.  Now f.mcde_app switcher / switcher-prev in all
three key messages of the 11 files.  SEEN (C locale, tools/mcde-keytest.sh, build/logs/mcde-keytest-2026-11-15c.log
exit=0): a box naming the program 'Dtterm' appears.

tools/mcde-keytest.sh: keys through tools/mcde-xkey.sh, a before/after screenshot
compare next to the window list, the terminal keys with a terminal focused.
docs/reference/shortcuts-test-2026-11-15.txt: key, expected, seen, verdict for the keys tried; Ctrl+F2 (the bar's menu
bar) is not bound anywhere.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 05:55:37 +00:00
lotherkandClaude Sonnet 5.5 53fdef60ad dtwm: F8 shows the workspaces as a grid of small screens with their windows; arrows, digit, Return or click switch (t0183, first part)
WmMcdeSpaces.c: an override-redirect window like the window overview, drawn
once on demand, nothing runs while it is closed.  Reached as f.mcde_app spaces
(a new function name is not bound by a key, as measured for the overview).
Seen on Xvfb: F8 opens it, Right + Return goes to Two, a click on Four goes
there, F8 twice closes, 1 goes back to One; docs/screenshots/leopard/Spaces-mcde.png.

The 'F9 does nothing' of t0058/t0216 was the test sender: xdotool 3.20160805
sends Alt_L before an F-key in this keymap, so the key arrives as Alt+F9.  With
plain XTest keycodes F8 reaches the root grab (ext/src/mcde/AGENTS.md).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 05:45:20 +00:00
lotherkandClaude Sonnet 5.5 e282d61715 docs/reference/netbsd-extattr.txt: file comments are dormant on a default NetBSD (t0200, step 1)
Read in src/: every ufs_*extattr operation answers EOPNOTSUPP until
extattrctl start has run (ufs_extattr.c:1048, :1165, :1291, :1323; started
only through ufs_extattr_autostart, :637, which needs /.attribute); FFS
does not start it at mount and no rc.d script does.  So on a default
install McdeSys' comment get/set answer MCDE_SYS_ENOTSUP ("This file system
keeps no comments"): the error mapping in netbsd.c is right, the feature does
nothing until an administrator sets it up.  The immutable-flag lock does not
depend on it.  Compile of netbsd.c with the cross gcc: clean.  Not run: no
NetBSD here (build/vm is gone).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 00:44:02 +00:00
lotherkandClaude Sonnet 5.5 e8d031cc63 dtlaunch: the clipboard history is opt-in and leaves passwords out (t0080 2')
What was copied is shown on the screen the moment the launcher opens, so a
password from a password manager sat there in clear.

- Dtlaunch*clipboardHistory, default False.  Off: nothing is asked of the
  clipboard's owner (no XFixes watch, no poll) and the hint line drops "the
  clipboard".  System Settings > Keyboard & Mouse > Shortcuts has the toggle
  "The launcher keeps a history of what was copied"; it writes the resource
  like the hot key does and restarts the launcher.
- On: a text that is new is kept only if its owner does not offer the target
  x-kde-passwordManagerHint with the value "secret" (what KeePassXC, KDE Wallet
  and others set; docs/reference/clipboard-password-hint.txt has the two
  sources and what they do not say).  An unchanged clipboard costs no second
  request.  The copy of the text is overwritten after use.

Measured (Xvfb, a small X program as the password manager, logging requests):
on: owners "ordinary-text-123" (no hint target), "hunter2-PASSWORD" (hint
"secret"), "second-ordinary-456": each got UTF8_STRING then the hint request;
the list shows the two ordinary texts, not the password.  Off (no resource):
0 requests in total, empty list.  The toggle in the real dtsystemsettings gives
the resource True, False, True; the indicator changes; the note fits.  Cross
compile (build's flags): dtlaunch.c and input.c without a warning; make check
of dtlaunch passes.  Not verified: a real password manager (the assumption
that its MIME type is an X11 target of that name is written in the reference
file), a launcher restart on a real session.  The default is the task's; one
word in dtlaunch.c's resource table turns it back.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 00:37:01 +00:00
lotherkandClaude Sonnet 5.5 26c5e01021 docs/reference/rust-cross.txt: how Rust gets to the NetBSD target (t0084, step 1)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 00:25:05 +00:00
lotherkandClaude Sonnet 5.5 7c0d3697c9 docs/reference/calendar-libs.txt: what pkgsrc has for iCalendar and what it costs MCDE (t0148, step 1)
libical 3.0.20 / 4.0.5 include glib2, icu and libxml2 unconditionally (libical4
also gobject-introspection); the sysroot has icu 93 MB, glib2 17 MB, libxml2 3 MB,
curl 4 MB -- there for other packages (icu: one, boost-libs; glib2: 15), while the
MCDE packages depend on Xft2, libjpeg-turbo and png only.  CalDAV = HTTP + XML;
www/curl and www/neon exist, no CalDAV client library by name.  Options with what
each needs; whether libical can be built without glib/ICU is NOT checked (source
not fetched).  The choice is Konrad's: it is a dependency of the whole desktop.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 23:54:39 +00:00
lotherkandClaude Sonnet 5.5 12e3dac436 docs/reference/netconfig.txt: NetBSD has no network 'location'; dhcpcd has selectors (t0131)
The base's network rc scripts and rc.conf defaults have no location/profile
concept (searched, existing files named).  dhcpcd.conf(5) has interface and ssid
blocks, profile NAME, fallback PROFILE and arping-selected profiles -- automatic
selection, no user switch.  A Location menu is therefore ours to design (ssid
blocks for Wi-Fi, or a directory per location that rewrites files etcupdate
owns); not a pane detail.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 23:53:22 +00:00
lotherkandClaude Sonnet 5.5 c6baf4eca8 docs/reference/dtmail.txt: what dtmail and libDtMail can do (t0127, step 2)
POP2/POP3/APOP/IMAP/AUTO classes are a RETRIEVAL of INBOX into the local mailbox
(append callback, retrieve_messages, ptrans_* like a fetch agent): no remote
folders, no sync, no IDLE; no TLS or STARTTLS anywhere in programs/dtmail; the
retrieval password sits in ~/.mailrc as a reversible uuencode-style encoding
(DtMailRc.C:314), no key.  Sending is the local sendmail (RFCTransport.C
launchSendmail), no SMTP client.  Consequences for the mail window are listed;
the windows' own code (RoamMenuWindow.C, SendMsgDialog.C) is not read yet.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 23:52:14 +00:00
lotherkandClaude Sonnet 5.5 a9a97a1f35 docs/reference/frontpanel.txt: what the Front Panel can be set to -- size, place, orientation, hiding (t0112)
Read in dtwm and DtUtil2: the PANEL record has 13 keywords; size is RESOLUTION
(HIGH/MEDIUM large, LOW small, MATCH_DISPLAY by screen width: 1176 HIGH, 851
MEDIUM, 512 LOW), place is PANEL_GEOMETRY (default centred at the bottom), there
is no orientation keyword (UI.c's XmNorientation are parts inside the panel) and
no auto-hide.  Not looked at: whether a user's .fp can override the shipped PANEL
record, and how dtwm is made to reread it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 23:50:56 +00:00
lotherkandClaude Sonnet 5.5 02f5ca9f48 docs/reference/login-screen.txt: dtlogin reads no user picture and has no automatic login (t0098)
The greeter (dtgreet: vgcallback.c vglogo.c vgmain.c vgutil.c vglang.c) asks for
the name in a text field (vgmain.c:197, :238); no user list, no picture, only
the Dtlogin*logo graphic.  Searches for autologin/.face/userlist/XmList in
dtgreet, dtlogin and dtsession find nothing; the man page's resources hold no
login option.  So 'Login Options' of the task is a feature dtlogin lacks, not a
setting: automatic login would bypass the password check of the program that
authenticates as root and needs a design and Konrad's agreement first.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 23:48:33 +00:00
lotherkandClaude Sonnet 5.5 bda2f2920c docs/reference/pkgdb-registration.txt: what registering the makronix set would take, measured (t0056)
The sysroot's pkgdb: 155 entries, 1423 files, 11 MB, 1.4 MB gzip.  pkg_install is
built with PREFIX=/usr/pkg, so its default database is /usr/pkg/pkgdb -- the
sysroot's own path, no relocation.  A copy rebuilt with pkg_admin rebuild lists
155 packages and finds vim, mcde, mcde-motif, fuse-afpfs-ng, flex; the owner
index (byfile.db) cannot be built on the build host (8 KB, 36151 'not on
filesystem') and has to be made on the target.  Defects to fix in the generator:
vim's relative @cwd, the build host's home directory in 67 files (3 install
scripts use it: xmlcatmgr, fontconfig, mcde), x11-links must stay out.  Options
(a) ship the entries in the set, (b) pkg_add from the medium's repository, with
what each needs; (a) is the reading.  The choice is Konrad's.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 22:50:45 +00:00
lotherkandClaude Sonnet 5.5 bf0bd544fe docs/reference/file-dialog.txt: the stock open/save dialog and how each program uses it (t0189, step 1)
What XmFileSelectionBox offers (resources, fileTypeMask values, search procs
that replace the list filling, the callback struct, the child names incl.
WORK_AREA), and the call sites of dtpad, dtphoto, dtpaint, dtsystemsettings,
dtmail and dticon with what each sets.  Findings: dtpad's Open reaches into the
box (filter text, selection text, file list), dtmail already adds its own
toggle 'Show hidden folders and files' as a child of the dialog, dticon uses
the widget class with all its labels, four programs remove the help button.
Not yet read: dtfile's Navigation.c and Columns.c (step 2); whether the
replacement is a new widget or a skin over the stock box is left open.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 22:31:31 +00:00
lotherkandClaude Sonnet 5.5 360e3f076a docs/reference/devpubd.txt: what devpubd(8) sees and what it does not (t0083)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 21:25:02 +00:00
lotherkandClaude Sonnet 5.5 e1ac51a187 docs: what an update checks before it runs as root, and what is open (t0078)
docs/reference/update-verification.txt: no signify in the base tree, sysupgrade
and makesums verify nothing, none of 264 NetBSD packages is signed, pkg_install's
X.509/OpenPGP verification and how to sign.  UPDATING.md: the section, with the
decisions that are Konrad's named as open.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 21:15:06 +00:00
lotherk 9be99131a3 MCDE dtwm: the window overview, F9/F10/F11 without a compositor (t0139)
New programs/dtwm/WmMcdeOverview.c: F9 (or Ctrl+Up) opens an
override-redirect window over the screen with a grid of tiles, one per
window, ordered by the windows' places; each tile keeps its window's aspect,
carries the frame's colour and the window's title (read from the XmString by
joining its text components -- XmStringGetLtoR with a tag of ours failed for
WM_NAME, measured).  Arrows, Tab and the pointer choose, Return or a click
raises and focuses that window and closes the view, Escape closes it.  No
live pictures, no dimming, no animation: drawn on Expose and when the choice
changes.

F10 (Ctrl+Down) keeps the focused program's windows (WM_CLASS); F11
iconifies every window of the workspace and the next F11 brings exactly those
back (the list is kept).

The keys route through f.mcde_app overview-all|overview-app|overview-desktop:
a new dtwm function name is not bound by a key (measured again with F9 and
f.mcde_overview, after f.mcde_switcher).  The five bindings are in the
built-in table (WmResource.c) and in every locale's sys.dtwmrc.tmsg -- fr_FR
had no "f.menu DtRootMenu" line, so its block got them after its last
binding (Alt<Key>F6 f.next_key transient) instead.  WmMain.c hands the
overview's events to McdeOverviewEvent before the rest of the dispatch.

Measured under Xvfb with xdotool (dtpad, dtsystemsettings, dtfile open):

  - F9: a 2x2 grid, three tiles with their titles ("System Settings",
    "File Manager - programs", "Text Editor - (UNTITLED)") --
    docs/screenshots/leopard/expose-mcde.png;
  - a click on the System Settings tile: the overview window is gone from
    the tree and _NET_ACTIVE_WINDOW changed from 0xe0002e (dtpad) to
    0x100002c (System Settings), which is first in the stacking order;
  - F10 with two dtpad windows and the others open: two tiles, both
    "Text Editor - (UNTITLED)";
  - F11: the three viewable windows are IsUnMapped; the second F11 makes
    exactly those three IsViewable again;
  - make programs/dtwm exit=0.

Open: the grid has no live window pictures (that needs a compositor) and no
dimmed desktop behind it -- the tiles are flat, as the design says.
2026-11-14 12:18:15 +00:00
lotherkandClaude Sonnet 5.5 ceae177fb5 mxupgrade: upgrade the base system with one command (t0055)
sysutils/sysupgrade (the NetBSD project's binary) joins the makronix set;
mxupgrade(8) turns file:// into a path, says what comes, runs sysupgrade and
copies kernel and cgdroot.kmod to /cgdboot on an encrypted system; sysinst
writes /etc/sysupgrade.conf.  docs/reference/sysupgrade.txt has what the
decisions rest on.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 12:09:08 +00:00
lotherk bd32e7468b MCDE dtfile: the strip view, the fourth Finder view without 3D (t0090)
A new view beside icons, small icons and the columns (Command+4): the chosen
picture large in the middle, three neighbours each side, flat, in Motif's
frame colours -- no perspective, no reflection, no glide; a redraw happens on
Expose and when the choice changes.  Under the strip the name is bold and
the kind follows (the type's label), then a scroll bar for the strip, then
the folder's list; the chosen line is selected and moves with the strip.

Pictures come from McdeThumb: only the visible entries are read, and the
second visit of a folder reads ~/.dt/thumbs (MCDE_THUMB_DEBUG=1 makes the
cache line appear; tools/mcde-shot.sh passes the variable into the session).
A file that is no picture is named where its neighbours are.

The arrows walk the strip (the list follows), Space is the file window's
preview, and the toolbar has the fifth toggle "Strip" -- its icon is the
folder's.  Command+4 was the small-icon view; that moved to Command+5
(docs/reference/shortcuts.txt), as the strip takes the fourth place of the
reference's four views.

Measured under Xvfb with xdotool, a folder of 13 PNGs:

  - Command+4 shows Bild-01 large with its neighbours
    (docs/screenshots/leopard/finder-cover-flow-mcde.png shows Bild-03
    chosen: two left, three right, "Bild-03.png" bold over "PNG", the list
    with Bild-03 selected);
  - Right twice walks to Bild-03 and the list's third line is selected;
  - switching to Icons and back to Strip serves three of the visible
    pictures from the cache: "thumb: .../Bild-02.png from the cache" and its
    neighbours in the log (MCDE_THUMB_DEBUG=1);
  - the strip's own drawing area takes the arrows and Space.

Open: the strip has its own list, not CDE's work-area list below it (the
status line and the other views' selection are not shared), and the split is
fixed -- no sash to drag.  Idle traffic was not measured separately; the
strip draws only on Expose and on a change, and McdeThumb reads no timer.
2026-11-14 11:37:22 +00:00