Skip to content

Add CommonFromViewMessages to FromModelEditorMessage#2940

Merged
robertbrignull merged 5 commits intomainfrom
robertbrignull/CommonFromViewMessages
Oct 10, 2023
Merged

Add CommonFromViewMessages to FromModelEditorMessage#2940
robertbrignull merged 5 commits intomainfrom
robertbrignull/CommonFromViewMessages

Conversation

@robertbrignull
Copy link
Copy Markdown
Contributor

Not sure how we didn't notice this until now but it seems the FromModelEditorMessage type doesn't include CommonFromViewMessages. This means it doesn't include messages for telemetry or errors.

However the view could still send those messages, and they would trigger the assertNever and cause an error. Probably every bit of telemetry was triggering this, but we didn't notice.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@robertbrignull robertbrignull requested review from a team as code owners October 10, 2023 13:48
@robertbrignull robertbrignull force-pushed the robertbrignull/CommonFromViewMessages branch from 408f1d8 to edf3cad Compare October 10, 2023 14:04
Copy link
Copy Markdown
Member

@koesie10 koesie10 left a comment

Choose a reason for hiding this comment

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

Thanks for catching this! Do you know why there was no unhandled error for receiving telemetry?

Comment thread extensions/ql-vscode/src/common/interface-types.ts Outdated
Comment thread extensions/ql-vscode/src/model-editor/model-editor-view.ts Outdated
Comment thread extensions/ql-vscode/src/model-editor/model-editor-view.ts Outdated
@robertbrignull
Copy link
Copy Markdown
Contributor Author

Do you know why there was no unhandled error for receiving telemetry?

As far as I can tell, there isn't any telemetry sent directly from the model editor view. Instead we're emitting the telemetry from the host, such as when handling the hideModeledMethods message we emit model-editor-hide-modeled-methods.

I discovered this because of hitting an unhandled error in the view.

@robertbrignull robertbrignull merged commit a662533 into main Oct 10, 2023
@robertbrignull robertbrignull deleted the robertbrignull/CommonFromViewMessages branch October 10, 2023 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants