Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(debugger): do not escape user input in debugger logs #327

Merged
merged 1 commit into from
Apr 6, 2022

Conversation

laurentlp
Copy link
Contributor

This PR adds the logic to handle displaying raw user data when possible.

The thumb rule is basic, don't escape characters that aren't escaped by the channel-web or the console.

Before

Screenshot from 2022-03-30 18-26-22

After

Screenshot from 2022-03-30 18-25-28

Closes botpress/v12#1588

@linear
Copy link

linear bot commented Mar 30, 2022

DEV-2245 [BUG] How data is showed in Botpress (botpress/botpress botpress/v12#1588)

Describe the bug
About the logs
When logs are shown in the Botpress Studio, HTML is always unescaped even if the real data is escaped.
Here is a screenshot showing exactly what I mean:

This makes it very hard to debug when seeing the logs from the UI since you really never know what the "real" value is.

Card links
When fetching from a variable, they should work when using double mustaches not only triple.
Just like it works with any other content types

Ping @EFF or me for more info

botpress/borpress botpress/v12#1588 by @ sebburon

**EFF **commented 5 days ago

1- In the logs panel, raw data should be displayed , the exact payload received in the websocket channel. (in this case, the browser should not render & )

2- The value sent as payload (value) when a user clicks on a button on a card button, dropdown item or single choice should be the raw value not the rendered value (in this case, & should be sent not the rendered &)

Copy link
Contributor

@sebburon sebburon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and good

@laurentlp laurentlp merged commit 60afbfa into master Apr 6, 2022
@laurentlp laurentlp deleted the dev-2245-bug-how-data-is-showed-in-botpress branch April 6, 2022 19:59
samuelmasse added a commit that referenced this pull request Apr 22, 2022
* feature(studio-ui): deploy chatbot button (#299)

* merge next

* first version deploy cloud btn

* polish button, better exp

* env var for link

* i18n

* ui bug changes

* spelling errors

Co-authored-by: Laurent Leclerc Poulin <laurentlp@users.noreply.github.com>

* Spelling Errors

Co-authored-by: Laurent Leclerc Poulin <laurentlp@users.noreply.github.com>

* Fr Spelling Mistake

Co-authored-by: Laurent Leclerc Poulin <laurentlp@users.noreply.github.com>

* Fr Spelling Mistake

Co-authored-by: Laurent Leclerc Poulin <laurentlp@users.noreply.github.com>

* todo move hardcoded value

* FR Change wording

* refactor functions

* refactor, more error codes

* eslint

* ignore libraries node modules

Co-authored-by: Laurent Leclerc Poulin <laurentlp@users.noreply.github.com>
Co-authored-by: allardy <yann.allard1@gmail.com>

* fix(studio): remove skill unusable on cloud (#316)

* feat(studio): allow disabling file listeners for read-only deployments (#242)

* fix(code-editor): minor ux fixes (#313)

* chore(studio-be): add route to invalidate cms cache for bot (#318)

* fix(code-editor): slight adjustment (#319)

* chore(server): v0.0.49 (#320)

* chore(inspector-kit): migrate superinput package to inspector-kit (#309)

* chore(inspector-kit): change file structure

* chore(inspector-kit): switch to scss modules

* feat(inspector-kit): finish setup; stub provider

* chore(inspector-kit): add storybook (#314)

* chore(inspector-kit): change file structure

* chore(inspector-kit): switch to scss modules

* chore(inspector-kit): add storybook

* fix(ts): wrong types for react-router-dom

* Implement text field as standalone (#315)

* chore(inspector-kit): change file structure

* chore(inspector-kit): add storybook

* chore(inspector-kit): add input; component and stories

* chore(inspector-kit): inherit from bp3 input; support leftIcon, rightElement

* Bootstrap inspector-kit tests (#321)

* feat(inspector-kit): add RTL

* chore(superinput): add tests

* chore(inspector-kit): update readme

* chore(migration): migration for srv_channels (#324)

* chore(migration): migration for srv_channels

* v0.0.50

* bump

* down migrate

* update mig

* fix typo

* fix(hooks): send events to core on bot mount and unmount (#322)

* update botpress.d.ts

* fix(actions): removed tooltip with doc of deprecated api (#326)

* feat(studio): add download modelweights step before uploading chatbot to cloud (#325)

* feat(studio): add download modelweights step before uploading chatbot to cloud

* removed typo

* pr comment

* fix(actions): fix number of conversations action (#328)

* chore(core): use proper env var for controller endpoint (#329)

* fix(dev): local cdm setup (#330)

* fix(dev): local cdm setup

* fix

* chore(dev): cloud local

* fix(debugger): do not escape user input in debugger logs (#327)

* fix(scope): call oauth with nlu scope (#334)

* chore(server): release v0.0.51 (#335)

* fix(code-editor): allow creating hooks with hook type as name (#333)

* feat(deploy): deploy to cloud btn should show failure toaster if runtime not ready (#336)

* feat(deploy): deploy to cloud btn should show failure toaster if runtime not ready

* chore(translations): add translations fr-en and point to those

* chore(es): add es translation

* feat(testing): added testing module to studio (#331)

* add missing translation

* fix(ui): toggle explorer (#338)

Co-authored-by: Laurent Leclerc-Poulin <laurentleclercpoulin@gmail.com>

* fix(cloud): cloud router error handling (#339)

* fix(cloud-service): error handling

* fix(ui): better handle push to cloud error codes

* Update packages/studio-be/src/studio/cloud/cloud-router.ts

Co-authored-by: Laurent Leclerc Poulin <laurentlp@users.noreply.github.com>

* Update packages/studio-be/src/studio/cloud/cloud-router.ts

Co-authored-by: Laurent Leclerc Poulin <laurentlp@users.noreply.github.com>

* Update packages/studio-be/src/studio/cloud/cloud-router.ts

Co-authored-by: Laurent Leclerc Poulin <laurentlp@users.noreply.github.com>

* custom error handling

* remove libraries feom sidebar

Co-authored-by: Laurent Leclerc Poulin <laurentlp@users.noreply.github.com>

* chore: remove libraries module (#342)

* wtf

* yarn

* fix

* fixes

Co-authored-by: Nick B <boutboulnicholas@gmail.com>
Co-authored-by: Laurent Leclerc Poulin <laurentlp@users.noreply.github.com>
Co-authored-by: allardy <yann.allard1@gmail.com>
Co-authored-by: Yann Allard <42552874+allardy@users.noreply.github.com>
Co-authored-by: David Vitor Antonio <david.vitora@gmail.com>
Co-authored-by: Laurent Leclerc-Poulin <laurentleclercpoulin@gmail.com>
Co-authored-by: Rob Gordon <rchristopher.gordon@gmail.com>
Co-authored-by: Thomas Caissie <30733005+tomkcey@users.noreply.github.com>
Co-authored-by: Francois-Xavier P. Darveau <955524+EFF@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] How data is shown/stored in Botpress
3 participants