Skip to content

fix: Handle undefined DashboardData props#1726

Merged
bmingles merged 6 commits intodeephaven:mainfrom
bmingles:1684-console-panel-no-session
Jan 22, 2024
Merged

fix: Handle undefined DashboardData props#1726
bmingles merged 6 commits intodeephaven:mainfrom
bmingles:1684-console-panel-no-session

Conversation

@bmingles
Copy link
Copy Markdown
Contributor

@bmingles bmingles commented Jan 11, 2024

  • Handle undefined props on DashboardData. Don't render console panel if no session
  • Fixed a set state on unmounted HeapUsage bug
  • Removed chatty async interval debug logging

fixes #1684

Testing

  • Run server with PSK enabled
  • Login and open any file
  • Logout should no longer show "ConsolePanel.tsx:372 Uncaught TypeError: Cannot destructure property 'config' of 'sessionWrapper' as it is undefined." error in debug console (Note that login will still fail until Open file blocks logout #1685 is done)

@bmingles bmingles requested a review from mofojed January 11, 2024 17:17
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 11, 2024

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (db219ca) 46.05% compared to head (607aa5e) 46.42%.
Report is 2 commits behind head on main.

❗ Current head 607aa5e differs from pull request most recent head 493c5a1. Consider uploading reports for the commit 493c5a1 to get more accurate results

Files Patch % Lines
...ashboard-core-plugins/src/panels/NotebookPanel.tsx 0.00% 5 Missing ⚠️
packages/code-studio/src/main/AppMainContainer.tsx 50.00% 4 Missing ⚠️
...dashboard-core-plugins/src/panels/ConsolePanel.tsx 42.85% 4 Missing ⚠️
...ages/dashboard-core-plugins/src/redux/selectors.ts 20.00% 4 Missing ⚠️
packages/console/src/HeapUsage.tsx 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1726      +/-   ##
==========================================
+ Coverage   46.05%   46.42%   +0.37%     
==========================================
  Files         621      611      -10     
  Lines       37430    37221     -209     
  Branches     9399     9376      -23     
==========================================
+ Hits        17237    17281      +44     
+ Misses      20139    19886     -253     
  Partials       54       54              
Flag Coverage Δ
unit 46.42% <28.57%> (+0.37%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread packages/console/src/HeapUsage.tsx
Comment thread packages/dashboard-core-plugins/src/panels/ConsolePanel.tsx Outdated
@bmingles bmingles force-pushed the 1684-console-panel-no-session branch from 607aa5e to c2b029c Compare January 19, 2024 16:46
@bmingles bmingles requested a review from mofojed January 19, 2024 16:48
Copy link
Copy Markdown
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

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

getDashboardSessionWrapper currently only returns SessionWrapper - that needs to be updated to allow undefined as well.

Comment thread packages/code-studio/src/main/AppMainContainer.tsx
Comment thread packages/dashboard-core-plugins/src/panels/ConsolePanel.tsx Outdated
@bmingles bmingles requested a review from mofojed January 22, 2024 18:46
@bmingles bmingles merged commit 45fa929 into deephaven:main Jan 22, 2024
@bmingles bmingles deleted the 1684-console-panel-no-session branch January 22, 2024 21:33
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConsolePanel should not render if there is no session

3 participants