Commit graph

519 commits

Author SHA1 Message Date
bunnie
fda782663a bump version pins for xous change 2023-12-26 00:13:10 +08:00
nworbnhoj
b6c5550116 fix chat-test menu_name 2023-12-02 21:26:51 +11:00
bunnie
efb087c01a
Merge pull request #455 from betrusted-io/mtxchat-layout-tests
WIP: Mtxchat layout refactor
2023-12-02 16:13:04 +08:00
bunnie
7dc4b9213f add chat-test mini-app
this now contains the UI tests as a stand-alone app
2023-12-02 16:09:59 +08:00
bunnie
0632e510be remove tests from mtxchat app 2023-12-02 16:09:37 +08:00
bunnie
fa3f349a0a bump pins as xous-rs has changed 2023-12-01 21:20:01 +08:00
bunnie
4a5bedd6ab Merge branch 'main' of github.com:betrusted-io/xous-core into mtxchat-layout-tests 2023-11-30 14:22:15 +08:00
nworbnhoj
9de7f0545a remove redundant rustls package from mtxchat manifest 2023-11-30 07:29:33 +11:00
bunnie
5ae064fb38 an initial test for look at post layouts 2023-11-28 17:52:52 +08:00
bunnie
60db6053bc add a feature for testing the UI on mtxchat
when `test-chat-ui` is selected as a feature and mtxchat is selected as
an app to build, this will override the mainloop of the `mtxchat` app
and create a test dialog & present it, laying a framework for controlled
debugging of the layout engine.
2023-11-28 17:25:27 +08:00
bunnie
367ede62b1 convert usbd-human-interface-device to xous-usb-hid 2023-11-16 17:27:00 +08:00
bunnie
4d949d153b Add option to generat number-only passwords (#446)
This commit adds explicit selection knobs for all possible
types of characters and symbols.

A side effect is there is also now an error loop to handle the
case that none of the knobs are selected. The user cannot
proceed with generation until at least one type is selected.

When no alphabetic characters are selected, "exclude similar" is
now false, which allows all of the numbers to be picked from.
Normally, 1, 0, etc. are avoided to make it easier for humans
to read/copy the passwords without ambiguity. This does reduce
the total entropy slightly, but ideally you are using the
password generator with a long setting (20 or so characters)
so you're well beyond the worry of losing entropy due to dropping
the few similar characters.
2023-11-15 19:14:08 +08:00
bunnie
063800a894
Merge pull request #447 from nworbnhoj/sigchat
Sigchat skeleton
2023-11-14 15:49:23 +08:00
bunnie
419e547641 bump usbd-hid-device crate to latest
API changes to see if we want to absorb this prior to forking.
2023-11-12 00:02:07 +08:00
nworbnhoj
3a5f2e9fc0 refactor Account.number 2023-11-06 12:24:40 +13:00
nworbnhoj
1cbe0c7488 refactor Manager.account 2023-11-06 09:28:13 +13:00
bunnie
d4624124c9
Merge pull request #443 from betrusted-io/chat-status
WIP: Chat status
2023-11-03 13:54:34 +08:00
bunnie
6ab88117f6 bump xous-api-log version & fix version pins 2023-10-31 20:07:28 +08:00
bunnie
f1cd3a4325
Merge pull request #439 from vihaanjim/main
An App Loader
2023-10-31 19:56:45 +08:00
bunnie
bd8537f874 update README to note the need for the unsafe-app-loading feature 2023-10-31 00:19:05 +08:00
bunnie
57c00987b8 cleanup formatting; terminate process on panic; add missing unsafe{}
this is some general clean-up on the code to get it in line with
the rest of the guidelines in the system + addresses some of @xobs
comments.
2023-10-30 23:58:40 +08:00
bunnie
d4a934785b re-introduce a default text to display when going out of busy state
this simplifies the problem of tracking concurrency if multiple threads
are requesting a busy-state to be presented. In this case, when the
final thread leaves its busy state, the idle-state will be shown.
2023-10-29 20:07:22 +08:00
bunnie
c3aa1f46cf use status bar to count receive events during listen 2023-10-29 20:06:57 +08:00
bunnie
29fe24728c add more wait states around long-run ops 2023-10-29 19:15:11 +08:00
bunnie
4423339059 move wifi delay hook to the correct area
- remove modal pop-up for wifi connection, and replace with
busy animation
- specify units of delay in the constants (_MS to indicate milliseconds;
this is a convention I'm trying to adhere to)
- partial progress on debugging why the animation isn't running
(value of animation variable is not being passed back at the GAM layer).

Also a general note on coding styles that probably is going to cause
confusion now that more people are contributing to the code base.

Generally, when a lot of "generic" library functions fail, we've been
passing an error message up the stack. However, these functions are
actually meant to be infalliable, and when you kick the error up the
stack you just end up with a panic at an unhelpful location (because
you finally catch the error only at the main loop or something and
by that point there's nothing you can really do about it but panic,
since it's supposed to be an infalliable operation).

As a result I have been trying to tamp down on needless error propagations
and having them fail with a unwrap or expect at the point where the
abstraction should be infalliable. This helps in debugging the actual
failure root cause because you're closer to the line of code that
actually broke, instead of just some line at a generic error handler.

Of course if you build with stack unwinding the top-level unwraps are more
useful because you can peer down into the call chain, but even then,
with the limited screen real estate I think deeply nested failures
would probably overflow any panic display. So even with panic unwinding
I think we stil want to keep the root cause within a few stack frames,
instead of errors being passed up sixteen levels of abstraction before
finally dying.

This only applies to things that are meant to be truly infalliable,
like syscalls that should not fail, or like unpacking a buffer or
memory message that has already been allocated. In this case the errors
are more like asserts, and are helpful if they fail at the line where
they break instead of being passed up the call stack (which was the
original architecture).

Probably I should add a note about this to the Xous Book.
2023-10-29 16:33:03 +08:00
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
f05f685556 revert accidental overwrite of a translation file it mtxcli 2023-10-27 14:14:39 +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
Vihaan Jim
752642f62d Cleanup
I noticed that I actually hadn't changed anything in the xous-rs
directory, so I got rid of the patch. I also removed a few files
that weren't being used. Furthermore, I noticed that a couple of
random files were different from upstream so I changed them back.
I also modified the README slightly.
2023-10-15 15:55:25 -04:00
Vihaan Jim
d99f40047c Finally fix build issues
I was facing a bunch of issues with the build system and
dependencies. I fixed it by using the Cargo.lock from upstream/main. I
also modified app-loader since as_slice_mut is now unsafe.
2023-10-14 17:09:28 -04:00
nworbnhoj
f51f781c3b implement sigchat chat menu items [register, link, close] 2023-10-15 09:55:09 +13:00
nworbnhoj
7b26c04fb0 implement sigchat account_setup() choice between Register / Link 2023-10-15 09:53:05 +13:00
Vihaan Jim
0a7a4fcfc1 Merge branch 'main' of https://github.com/betrusted-io/xous-core 2023-10-14 14:45:50 -04:00
nworbnhoj
6ac476ae4f implement sigchat Manager & Account
Structure modeled on signal-cli by AsamK <asamk@gmx.de> and contributors
2023-10-14 16:54:28 +13:00
nworbnhoj
573db5c24b init sigchat app from mtxchat 2023-10-14 16:08:32 +13:00
bunnie
d63b5912b1 absorb new xous-rs version 2023-10-10 16:50:00 +08:00
Vihaan Jim
e7445e1b62 Merge branch 'main' of https://github.com/betrusted-io/xous-core 2023-10-05 17:17:26 -04:00
Vihaan Jim
5402461794 Merge 2023-10-05 17:15:25 -04: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
Vihaan Jim
5dda363157 Merge branch 'main' of https://github.com/betrusted-io/xous-core 2023-09-30 18:07:58 -04: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