Commit graph

466 commits

Author SHA1 Message Date
bunnie
4e027b676c remove logic from status primitive and make the interface simpler
- status bar text is just status bar text now
- idle animation runs/stops based on an explicit run/stop message

Note that at the moment if one starts the busy bar and a modal pops
up, you might overflow the queue of the ui drawing thread with animation
requests, because the thread blocks when the modal is summoned.

Modals "take the screen" anyways, so maybe the solution to this is
to add an additional interlock around any modal calls within the UI
main thread. Need to think about it a bit more.
2023-10-29 01:08:38 +08:00
bunnie
4142549804 try to lay in some hooks for how to interact with the busy API
this is just an example, want to get this up for review before
debugging all the problems
2023-10-20 00:50:29 +08:00
bunnie
d63b5912b1 absorb new xous-rs version 2023-10-10 16:50:00 +08:00
bunnie
83256257e1 bump xous-rs crate to absorb Send derives on Messages
this is necessary for the smoltcp port
2023-10-03 20:54:14 +08:00
bunnie
7e204604e9
Merge pull request #418 from nworbnhoj/chat
integrate tls trusted root_store into mtxchat
2023-09-26 11:02:18 +08:00
nworbnhoj
a89a344480 update mtxchat README.md 2023-09-25 21:10:35 +10:00
nworbnhoj
61c1747475 integrate tls trusted root_store into mtxchat
Set up tls with rustls::ClientConnection,
BUT - on Error::InvalidCertificate - then
probe the host for the untrusted certificate chain and prompt the user
to perhaps trust one of the certificates in the chain - then try again.
2023-09-25 11:22:47 +10:00
bunnie
122febafea remove status from mtxcli 2023-09-20 22:13:33 +08:00
bunnie
9f57ad96fd
Merge pull request #408 from nworbnhoj/chat
mtxchat app and chat library
2023-09-19 19:09:56 +08:00
bunnie
05d7e26ab7
remove status which is not a target
status doesn't have a `lib` configuration, so it can't be a target for mtxchat
2023-09-19 17:45:22 +08:00
bunnie
7a9f216405
bump xous pins
this should help the merge go more smoothly
2023-09-19 17:37:02 +08:00
bunnie
000d6606ce helps to actually have the line uncommented for the fix to work... 2023-09-19 01:59:38 +08:00
bunnie
43b0beecd4 add work-around to keep ct_eq from being optimized out
See #416 for details
2023-09-19 00:58:50 +08:00
bunnie
bdf70ab0e4 refactor API to upgrade subtle API in attempt to fix ct_eq problem
this didn't work, but, it's probably worth leaving the change in
place because this might fix other stuff we don't know about.
2023-09-18 23:55:33 +08:00
nworbnhoj
49936abc97 fix mtxchat.login() 2023-09-18 19:10:16 +10:00
nworbnhoj
7803efec7f pass room_alias aka dialogue_id aka dialogue.pddb_key to mtxchat.listen()
this ensures that new Matrix Events received from the server are added to the correct chat::Dialogue
2023-09-18 18:49:59 +10:00
nworbnhoj
65cc7feb05 implement mtxchat.room_alias() 2023-09-18 18:24:33 +10:00
nworbnhoj
b413345ac1 fix mtxchat.client_sync() url query contruction 2023-09-18 18:21:25 +10:00
nworbnhoj
b890c419c9 mtxchat refine url construction 2023-09-17 11:14:43 +10:00
nworbnhoj
124f949576 fix mtxchat new_user & new_room help 2023-09-16 06:59:08 +10:00
nworbnhoj
65dcf64720 fix mtxchat login() 2023-09-16 06:57:44 +10:00
nworbnhoj
0fbd331f37 mtxchat ensure longer keys are properly replaced 2023-09-15 07:08:07 +10:00
nworbnhoj
4453d9629f mtxchat update readme with prereq net tls probe matrix.org 2023-09-14 06:01:17 +10:00
nworbnhoj
61743a9c76 mtxchat tidy-up 2023-09-14 05:30:33 +10:00
nworbnhoj
7837df02d4 mtxchat break-out listen server into mod 2023-09-14 05:25:51 +10:00
nworbnhoj
747fb93c58 mtxchat replace EMPTY String with Option<String> 2023-09-13 15:31:23 +10:00
nworbnhoj
a06d84d8a9 convert mtxchat to use tls.root_store()
a ureq::Agent is configured to use tls.root_store(), and used for all comms with the matrix server
2023-09-13 07:18:22 +10:00
nworbnhoj
c22419f7c7 bump rustls to harmonize versions 2023-09-13 06:57:39 +10:00
bunnie
478a612c02 commit version bump 2023-09-12 16:25:10 +08:00
Sean Cross
5dfad296ae xous: mark MemoryRange::as_slice and friends as unsafe
Mark `MemoryRange::as_slice()` and `MemoryRange::as_slice_mut()` as
unsafe.

This is due to the fact that not all representable types can be cast to
an arbitrary value. For example, if Process A sends random values to
Process B, then Process B casts the memory to a slice of `bool`, then
any values that are not 0 or 1 are undefined.

Because these functions can leak UB into the program, they are marked as
unsafe.

This patch adds `unsafe {}` blocks to all instances where this function
is called. Additionally, all instances have been checked to verify that
they do not cast to any invalid types -- most use `u8` or `u32`.

Additionally, the long-deprecated `MemoryRange::from_parts()` call was
removed, since that causes UB without being marked as unsafe.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-09-12 10:07:38 +08:00
nworbnhoj
a46dad11d2 mtxchat tidy-up 2023-09-09 10:36:37 +10:00
nworbnhoj
66738c0251 mtxchat fix missing write TOKEN_KEY 2023-09-09 10:30:59 +10:00
nworbnhoj
82e5dbe714 mtxchat add progress modal on matrix event import
This progress modal also masks a suspected race condition on Precursor.
    "Guru Mediation" `violated: nonNull::new_unchecked`

Calling ChatOp::PostAdd in quick succession appears to corrupt the pddb record - particularly with more bytes.
2023-09-09 10:30:03 +10:00
nworbnhoj
c50cc73610 mtxchat add navigation help on first login
chat add help navigation modal
2023-09-09 10:24:52 +10:00
nworbnhoj
07ef4d16c2 mtxchat add modal begging for patience 2023-09-09 10:20:24 +10:00
nworbnhoj
7a13439d5c mtxchat replace File & PathBuf with native Pddb 2023-09-09 05:51:21 +10:00
nworbnhoj
fbd49aea21 mtxchat separate pddb::dict for mtxchat.state & mtxchat.dialogue 2023-09-08 19:45:11 +10:00
nworbnhoj
9254163e5a chat implement wifi connect modal 2023-09-08 19:41:59 +10:00
nworbnhoj
e1f1ac427b mtxchat simplify create pddb::dict mtxchat 2023-09-08 18:01:00 +10:00
nworbnhoj
a7d3b34563 Merge branch 'main' into chat 2023-09-08 13:48:45 +10:00
nworbnhoj
3542103510 mtxchat tidy-up 2023-09-08 13:46:52 +10:00
nworbnhoj
9b32333b1e mtxchat README 2023-09-07 17:20:11 +10:00
nworbnhoj
f9c9521c8a fix mtxchat MenuOp::Room 2023-08-30 04:48:05 +10:00
nworbnhoj
2f157d5957 implement ChatOp::Dialogue::Save 2023-08-30 04:46:44 +10:00
nworbnhoj
197ed63058 chat tidy-up 2023-08-22 16:59:26 +10:00
nworbnhoj
01ea471fd0 implement mtxchat basic chat ui menu 2023-08-15 04:29:07 +10:00
nworbnhoj
b095462f29 implement mtxchat post() 2023-08-15 04:11:13 +10:00
bunnie
a40663bd63 refresh item cache after leaving host readout mode 2023-08-14 14:21:53 +08:00
nworbnhoj
ca211e170a implement mtxchat.connect() 2023-08-11 05:24:50 +10:00
bunnie
53469a68d0 publish package updates, sync to release tag 2023-08-08 14:35:49 +08:00