Skip to content

feat(everything): add GitHub code link to home tab #371#413

Open
TheCodingAyush wants to merge 3 commits intoalpic-ai:mainfrom
TheCodingAyush:add-home-message
Open

feat(everything): add GitHub code link to home tab #371#413
TheCodingAyush wants to merge 3 commits intoalpic-ai:mainfrom
TheCodingAyush:add-home-message

Conversation

@TheCodingAyush
Copy link
Contributor

@TheCodingAyush TheCodingAyush commented Jan 28, 2026

Fixes #371

Changes based on reviewer feedback:

  • Use useOpenExternal hook instead of plain anchor tag
  • Add https://github.com to CSP redirectDomains
  • Shorten link text to "Github"

Greptile Overview

Greptile Summary

Added a clickable GitHub link to the home tab that opens the repository in an external browser. The implementation properly uses the useOpenExternal hook instead of a plain anchor tag, and adds the necessary CSP configuration to allow redirects to https://github.com.

Key changes:

  • Added https://github.com to the CSP redirectDomains array in examples/everything/server/src/server.ts:20
  • Implemented GitHub link using useOpenExternal hook with proper event handling in examples/everything/web/src/widgets/tabs/home-tab.tsx:22-24
  • Changed link text from full URL to "Github" for better readability

Confidence Score: 4/5

  • Safe to merge with one minor style improvement suggested
  • The implementation correctly addresses the reviewer's feedback by using useOpenExternal hook and adding proper CSP configuration. One minor redundant style property was found but doesn't affect functionality
  • No files require special attention - changes are straightforward and well-implemented

(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

Copilot AI review requested due to automatic review settings January 28, 2026 18:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a clickable GitHub link to the home tab of the "everything" example app, allowing users to view the full code implementation. The changes follow reviewer feedback to use the useOpenExternal hook for better platform compatibility and add the GitHub domain to the CSP configuration.

Changes:

  • Updated HomeTab component to use useOpenExternal hook for opening the GitHub repository link
  • Added https://github.com to the CSP redirectDomains configuration
  • Changed link text from full URL to shortened "Github"

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
examples/everything/web/src/widgets/tabs/home-tab.tsx Implements clickable GitHub link using useOpenExternal hook with onClick handler
examples/everything/server/src/server.ts Adds GitHub domain to CSP redirectDomains whitelist to allow external navigation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

style={{ cursor: "pointer" }}
>
github.com/alpic-ai/skybridge/tree/main/examples/everything
Github
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The link text should be "GitHub" (with capital H) instead of "Github" to match the official brand capitalization. Throughout the codebase, "GitHub" is consistently used (e.g., in CONTRIBUTING.md, README.md, and packages/core/src/commands/dev.tsx).

Suggested change
Github
GitHub

Copilot uses AI. Check for mistakes.
Comment on lines 18 to 29
<a
href="https://github.com/alpic-ai/skybridge/tree/main/examples/everything"
target="_blank"
rel="noopener noreferrer"
href="#"
onClick={(e) => {
e.preventDefault();
openExternal(
"https://github.com/alpic-ai/skybridge/tree/main/examples/everything"
);
}}
style={{ cursor: "pointer" }}
>
github.com/alpic-ai/skybridge/tree/main/examples/everything
Github
</a>
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

For better accessibility, consider adding role="button" to this anchor element since it behaves as a button rather than a traditional link. When using href="#" with onClick, it's best practice to indicate to assistive technologies that this is a button-like interaction. Additionally, the link should be keyboard accessible - consider adding onKeyDown handler to support Enter/Space key presses.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

"https://github.com/alpic-ai/skybridge/tree/main/examples/everything"
);
}}
style={{ cursor: "pointer" }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Redundant style - anchor tags already have cursor: pointer by default

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: examples/everything/web/src/widgets/tabs/home-tab.tsx
Line: 26:26

Comment:
Redundant style - anchor tags already have `cursor: pointer` by default

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

- Capitalize GitHub properly
- Add role=button for accessibility
- Remove redundant cursor style
@@ -12,11 +16,16 @@ export function HomeTab() {
<p className="description">
Read the full code implementation on{" "}
<a
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can use

  • i don't think href="#" is necessary ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! I'll switch to a element instead that would be cleaner as compared to using an anchor tag with href="#"

href="#"
role="button"
onClick={(e) => {
e.preventDefault();
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do you need to prevent default ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right with a this won't be needed. Switching to a button element now.

- Replace <a href='#'> with <button> per reviewer feedback
- Remove unnecessary preventDefault and role='button'
- Add link-button CSS class for styling
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.

Add a message on the home tab of the everyhting example app

3 participants