frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Refactor frontend part 7

Open RichDom2185 opened this issue 2 years ago • 1 comments

Description

Supersedes #2518.

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update
  • [x] Code quality improvements

How to test

Checklist

  • [x] I have tested this code
  • [ ] I have updated the documentation

RichDom2185 avatar Mar 17 '24 04:03 RichDom2185

Pull Request Test Coverage Report for Build 8673716388

Details

  • 22 of 93 (23.66%) changed or added relevant lines in 12 files are covered.
  • 10 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.04%) to 33.973%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/pages/academy/gameSimulator/subcomponents/chapterSimulator/ChapterSimulatorTextLoader.tsx 0 1 0.0%
src/pages/academy/groundControl/configureControls/ExportScoreLeaderboardButton.tsx 0 1 0.0%
src/pages/academy/groundControl/configureControls/ExportVoteLeaderboardButton.tsx 0 1 0.0%
src/pages/sicp/Sicp.tsx 1 2 50.0%
src/features/sicp/chatCompletion/chatCompletion.ts 3 6 50.0%
src/commons/utils/Hooks.ts 1 6 16.67%
src/features/sicp/chatCompletion/api.ts 0 7 0.0%
src/commons/mobileWorkspace/MobileWorkspace.tsx 2 21 9.52%
src/pages/sicp/subcomponents/chatbot/ChatBox.tsx 4 37 10.81%
<!-- Total: 22 93
Files with Coverage Reduction New Missed Lines %
src/commons/sagas/RequestsSaga.ts 1 13.1%
src/pages/sicp/subcomponents/chatbot/ChatBox.tsx 3 6.49%
src/pages/sicp/subcomponents/chatbot/Chatbot.tsx 6 4.76%
<!-- Total: 10
Totals Coverage Status
Change from base Build 8673551384: 0.04%
Covered Lines: 5249
Relevant Lines: 14371

💛 - Coveralls

coveralls avatar Mar 17 '24 04:03 coveralls

More important/relevant commits:

https://github.com/source-academy/frontend/pull/2846/commits/85f914a0d8289c018e835c52c78016f691b5e506 Refactoring of chat completion prompt logic

telegram-cloud-photo-size-5-6111896723619169997-x

https://github.com/source-academy/frontend/pull/2846/commits/b8cf72b65fe3eac92ddaf5994d3cd3f566c2a207 Refactoring of chat box component state & logic

telegram-cloud-photo-size-5-6111896723619169999-y

https://github.com/source-academy/frontend/pull/2846/commits/cc0052f6cfe3d0485b1f10e2bcd21f326a14956e Decoupling of chat box UI rendering from completion logic

telegram-cloud-photo-size-5-6111896723619170001-y

RichDom2185 avatar Apr 13 '24 06:04 RichDom2185

@RichDom2185 Thank you for the wonderful effort. LGTM.

yiwen101 avatar Apr 13 '24 13:04 yiwen101

@RichDom2185 Thank you for the wonderful effort. LGTM.

Thanks for helping to catch the double request bug and suggestions!

RichDom2185 avatar Apr 13 '24 13:04 RichDom2185