Commit graph

6032 commits

Author SHA1 Message Date
nworbnhoj
0fc9a07f5e replace TcpStream::connect(&str) with TcpStream::connect((&str, u16))
resolves #453
2023-11-30 19:41:42 +11:00
bunnie
b255468eb1
Merge pull request #452 from nworbnhoj/main
minor fixes across chat components
2023-11-30 13:36:39 +08:00
nworbnhoj
9de7f0545a remove redundant rustls package from mtxchat manifest 2023-11-30 07:29:33 +11:00
nworbnhoj
ffa3d56af4 fix ChatOp::PostAdd to default correctly to dialogue_key set by ChatOp::DialogueSet 2023-11-30 07:24:58 +11:00
nworbnhoj
7e485885b7 introduce tls probe help modals
- invalid certificate modal
- unknown issuer modal
- not valid yet modal
2023-11-29 16:42:21 +11:00
nworbnhoj
492d089d5c fix typos 2023-11-29 12:06:02 +11:00
bunnie
26a1277097
Merge pull request #450 from kbroch-rivosinc/main
Move license file to top level so github can detect it
2023-11-17 13:12:51 +08:00
Kevin Broch
37a47a0dbd Move license file to top level so github can detect it 2023-11-16 20:59:16 -08:00
bunnie
367ede62b1 convert usbd-human-interface-device to xous-usb-hid 2023-11-16 17:27:00 +08:00
bunnie
498b898964 update release notes 2023-11-15 21:26:31 +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
e2d2c49212 bump lock file to reflect sigchat 2023-11-15 19:13:50 +08:00
bunnie
063800a894
Merge pull request #447 from nworbnhoj/sigchat
Sigchat skeleton
2023-11-14 15:49:23 +08:00
bunnie
bd4434332a
Merge pull request #448 from betrusted-io/usb-hid-prefactor
RFQ: is it worth it to absorb the lates usbd-human-interface-device changes prior to forking?
2023-11-13 22:13:48 +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
bunnie
4f75cd76a8 Merge branch 'main' of github.com:betrusted-io/xous-core into main 2023-11-11 23:13:19 +08:00
bunnie
5ad6106daf fix missing arg on unsafe-app-loading 2023-11-11 23:12:51 +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
11fd5fd104 bump lockfile to reflect new pins 2023-10-31 20:11:48 +08:00
bunnie
94e618606f bump verifier 2023-10-31 20:11:30 +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
vihaanjim
c904b47f82
Merge pull request #1 from betrusted-io/apploader
Apploader
2023-10-30 17:11:20 -04:00
bunnie
699372d8d3 add hashmarks to the status bar when a new name is registered
we can't guarantee that we're running only signed code at this point,
so create a visual indicator of this.
2023-10-31 00:42:25 +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
c346485832 isolate unsafe app loading features behind unsafe-app-loading feature gate 2023-10-31 00:18:42 +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
6cdb6e30f5 revert patch-out of xous-api 2023-10-30 23:58:08 +08:00
bunnie
5aefcac8ec add forced redraw function, fix misdirected message
- rapid redraws are normally aborted by this routine. offer a forced
redraw in the case that a "final state" has to be rendered without
fail.

- fix a misdirected message (sending it to app instead of to ui by
accident)
2023-10-29 23:03:46 +08:00
bunnie
ae7ee770ee expose the GAM minimum redraw period
this could be useful for functions that have to rapidly
toggle events on the screen and want to make sure that
the last event actually is rendered.
2023-10-29 23:02:44 +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
cdada99705 miss copy-back of the animation state 2023-10-29 19:14:57 +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
d844c4306c reduce size of chat status bar to match status bars above 2023-10-28 22:50:23 +08:00
bunnie
8f549b3031 pick a more "happens to be aesthetic" setting for the XOR op defacing
XOR op should not be usable to create fake security boxes

but it also looks really ugly to have it defaced.

This small tweak makes the XOR function look decent for the initial
purpose of the function (chat status bar wait indicator).

Eventually, this will be a controversial decision, but I'll kick
that down the road.
2023-10-28 22:48:52 +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
bunnie
be39c44b17 add a stand-in initial startup message
This prompts users on how to raise the menu. Not sure if it's
the right thing, but it's something.
2023-10-20 00:48:10 +08:00
bunnie
b456bfaf3b add busy-wait animation server and hooks for managing the same
Busy-wait animaitions are handled by a helper server that is normally
blocked. A single shared `bool` indicates whether the animation should
run or not.

When woken up, the busy-wait animator will check if the shared `bool`
is set, and if so, send a message to the main loop to update
the animation, then send wait an appropriate timeout and send itself
a message to re-check the animation status.

This particular format of server is fairly compact but can be vulnerable
to a "message storm" if busy state updates happen in rapid
succession without allowing the server to unblock and handle messages.
Thus, all messages to this server use a `try_send` method, with a silent
failure if the message can't be sent. In other words, if the animator
is already super busy and its queue is full, don't send it more messages,
just drop the existing updates so we can fail without a panic or deadlock.
The typical consequence of this is some UX inconsistency, which is
not a critical error.
2023-10-20 00:43:09 +08:00
bunnie
355425726d add data structures to track status bar state
- status bar gets some initial text on boot
- previous status message is saved when entering a busy state,
and restored on exit
- add routines for hopefully making the redraw a bit more efficient
if the only thing happening is a busy-wait update.
2023-10-20 00:41:19 +08:00
bunnie
8401d924e0 add opcodes for updating status bar and running busy animations 2023-10-20 00:40:26 +08:00
bunnie
e2594a3000 fix visibility of default font 2023-10-20 00:39:03 +08:00
bunnie
006530a1f5 make the default style for the text box something API-level accessible
this allows other functions to lay out based on the default style
without having to guess it.
2023-10-19 22:39:06 +08:00
bunnie
4e93e903a3 didn't mean to check in this flag 2023-10-19 17:45:09 +08:00
bunnie
367ca1c132
Merge pull request #441 from betrusted-io/busy-text
implement an underlying graphics primitive for a busy bar animation
2023-10-19 17:10:21 +08:00