User feedback in Navigator?

Hi All,

Is there a way to display simple feedback messages in Navigator?
Eg: “Action XXX completed successfully”
“Error: the reason is…”

If not, what is the recommended way of communication with the user? debug message or does another/better command exist?

Thank you!

1 Like

Unfortunately this won’t answer your question, but be aware that errors/debug messages will show up in the logs, so that’s your best bet to start troubleshooting.
Failed transactions will bring up a little :no_entry_sign: sign in the top-right of the navigator - it’s quite subtle unless you know what to look out for. Once you see this, just look in the sandbox or navigator log …
I know it’s not what you’re after. Maybe somebody else has a better suggestion.

1 Like

Thank you @Luciano .
Unfortunately I don’t see debug messages present in my Daml templates anywhere. Is there a setting that I would need to turn maybe?
Debug messages written inside a Daml script do show in the terminal from which I call my script. Not the other ones though.

Thank you for any hints.

1 Like

There is no good way to do any custom user feedback in Navigator. In general, Navigator doesn’t aim to be a ui framework, for that type of stuff you are better off building your own UI based on the JSON API and the JavaScript client libraries. The getting started guide walks you through a simple example.

As for viewing debug messages, take a look at How can I make debug statements visible in the sandbox logs? - #2 by cocreature. However, that still won’t make them available in navigator.

2 Likes

@mlyczak depending on what you’re trying to do you may want to try using DABL instead of Navigator. As other mentioned the best way to build a UI is using the JavaScript libraries, but if your purpose is just to use a generic UI for fast prototyping or POC, DABL may give you enough out of the box

1 Like

Thank you very much All for your replies, hints and suggestions.

1 Like

You need to pass the --log-level=DEBUG option to sandbox (or --sandbox-option --log-level --sandbox-option DEBUG if using daml start) to display the messages in sandbox.log.

1 Like

A small side note: the Navigator backend does store a list of all commands submitted through the same backend, together with the command status (including error messages). This list can be queried using the (internal) Navigator GraphQL API, we just don’t have a built-in UI for it. In addition, this list will only contain error messages returned through the ledger API, it will not contain detailed internal messages that can be found in the ledger log files.

1 Like