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

Full stack/refactor internal session vars - adapt backend code to botState data model #1966

Conversation

vanbasten17
Copy link
Contributor

@vanbasten17 vanbasten17 commented Oct 19, 2021

NOTE: Personal recommendation, review changes commit by commit. Below a brief description:

Description

  • Added paths to every route in dev-template in order to check that Botonic's debug tab is working correctly. Sorted imports and disable naming convention of files (to be changed in @botonic/dx in next iterations). 0c6ec8d
  • Changes that need to be done in bot project (dev-template) to support BotState. 5151797
  • Data models splitting and review types: ae4f362
  • Changes needed in /events endpoint to support BotState: 2e43d73
  • Changes in core-bot to work with BotState: 3c8aa2c
  • Adapt router tests to use botState: a295c73, skipped tests for handoff file as this functionality is still not supported.

Context

Part of splitting botonic data models into User, Session and BotState.

Approach taken / Explain the design

To document / Usage example

Testing

The pull request...

  • has unit tests
  • has integration tests
  • doesn't need tests because... [provide a description]

@vanbasten17 vanbasten17 changed the title Full stack/refactor internal session vars backend Full stack/refactor internal session vars - adapt backend code to botState data model Oct 19, 2021
Copy link
Contributor

@asastre asastre left a comment

Choose a reason for hiding this comment

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

LGTM!! I've put comments with some doubts.

packages/botonic-core/src/models/bot-state.ts Show resolved Hide resolved
packages/botonic-api/src/rest/routes/events.ts Outdated Show resolved Hide resolved
packages/botonic-core/src/handoff.ts Outdated Show resolved Hide resolved
@vanbasten17 vanbasten17 marked this pull request as ready for review October 22, 2021 08:52
@vanbasten17
Copy link
Contributor Author

@asastre , applied feedback in this next PR's commit: e30f690

@vanbasten17 vanbasten17 force-pushed the full-stack/refactor-internal-session-vars branch from e16d3f3 to 3b5fb3b Compare October 29, 2021 15:06
@vanbasten17 vanbasten17 force-pushed the full-stack/refactor-internal-session-vars-backend branch from a295c73 to ee9657a Compare October 29, 2021 15:07
@github-actions
Copy link

github-actions bot commented Oct 29, 2021

Unit Test Results

  1 files  ±0    7 suites  ±0   3m 28s ⏱️ -16s
32 tests ±0  32 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit ee9657a. ± Comparison against base commit 3b5fb3b.

♻️ This comment has been updated with latest results.

…tState data model (#1967)

* chore(react): changes in webchat regarding move to botState model

* refactor(core/api/dev-template): remove initial locale and minor fixes

* refactor(react): remove locale from initial session and make use of merge func
@vanbasten17 vanbasten17 merged commit cce00af into full-stack/refactor-internal-session-vars Oct 29, 2021
@vanbasten17 vanbasten17 deleted the full-stack/refactor-internal-session-vars-backend branch October 29, 2021 15:21
vanbasten17 added a commit that referenced this pull request Oct 29, 2021
…o be changed into experimental (#1948)

* chore(react): move necessary files to be changed into experimental and update imports

* chore: add more necessary files to be changed

* Full stack/refactor internal session vars - adapt backend code to botState data model (#1966)

* chore(dev-template): remove warnings in Actions and sort imports

* chore(dev-template): project changes regarding botState data model

* chore(core): split data models into User, Session and BotState

* chore(api): changes regarding botState in botonic/api

* chore(core): core-bot and router logic to work with botState

* chore(core): adapt tests to work with botState model, disabling handoff tests for 1.0

* Full stack/refactor internal session vars - adapt frontend code to botState data model (#1967)

* chore(react): changes in webchat regarding move to botState model

* refactor(core/api/dev-template): remove initial locale and minor fixes

* refactor(react): remove locale from initial session and make use of merge func
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.

None yet

2 participants