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

feat: link to dashboard from status bar #255

Merged
merged 3 commits into from
Dec 31, 2024

Conversation

Hellebore
Copy link
Contributor

@Hellebore Hellebore commented Dec 31, 2024

Checklist

  • If package.json or yarn.lock have changed, then test the VSIX built by yarn run vsce package works from a direct install

Summary by Sourcery

New Features:

  • Clicking the status bar icon opens the Sourcery dashboard in a browser.

Copy link
Contributor

sourcery-ai bot commented Dec 31, 2024

Reviewer's Guide by Sourcery

This PR updates the Sourcery extension to open the Sourcery dashboard in a browser when the status bar item is clicked. Previously, it opened a webview panel within VS Code.

Sequence diagram: Status bar click behavior before and after changes

sequenceDiagram
    actor User
    participant StatusBar
    participant VSCode
    participant Browser

    rect rgb(200, 200, 200)
    Note over User,Browser: Before changes
    User->>StatusBar: Click status bar item
    StatusBar->>VSCode: Open Hub webview panel
    VSCode-->>User: Show Hub panel in VS Code
    end

    rect rgb(173, 216, 230)
    Note over User,Browser: After changes
    User->>StatusBar: Click status bar item
    StatusBar->>Browser: Open dashboard URL
    Browser-->>User: Show Sourcery dashboard
    end
Loading

[FILTERED - User journey diagrams are low quality] User journey diagram: Managing Sourcery account

journey
    title Managing Sourcery Account
    section Before
      Click status bar: 5: User
      View Hub panel: 3: User
    section After
      Click status bar: 5: User
      View dashboard in browser: 4: User
Loading

File-Level Changes

Change Details Files
Open Sourcery dashboard in browser
  • Updated the command handler for sourcery.hub.start to open the Sourcery dashboard URL in an external browser.
  • Removed the code that opened the webview panel for the Sourcery Hub and all related code including the hubWebviewPanel variable and its usage.
  • Removed the code that sent the sourcery.startHub command to the language server.
src/extension.ts
Update status bar tooltip
  • Changed the tooltip of the status bar item from "Manage Sourcery settings" to "Manage Sourcery account"
  • Updated the title of the command associated with the status bar item from "Open Sourcery Hub" to "Manage Sourcery account."
src/extension.ts
package.json
Remove hub functionality
  • Removed the entire src/hub.ts file, which contained the code for the Sourcery Hub webview panel and its related functionality.
src/hub.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Hellebore - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Since package.json was modified, please verify that the VSIX package works with a direct install as mentioned in the PR checklist
  • This changes the UX from an integrated webview to opening in external browser. Could you explain the rationale for this change and any UX considerations that were taken into account?
Here's what I looked at during the review
  • 🟢 Functionality: all looks good
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Review instructions: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

LangSmith trace

Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

src/extension.ts Outdated Show resolved Hide resolved
src/extension.ts Outdated Show resolved Hide resolved
@Hellebore Hellebore merged commit dc1432d into main Dec 31, 2024
1 check passed
@Hellebore Hellebore deleted the nick/feat/dashboard-statusbar branch December 31, 2024 17:09
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.

1 participant