Skip to content

Add page scrolling, display README files, and show commit history.#1138

Merged
benjamin-747 merged 7 commits into
gitmono-dev:mainfrom
larissa-la:main
Jun 18, 2025
Merged

Add page scrolling, display README files, and show commit history.#1138
benjamin-747 merged 7 commits into
gitmono-dev:mainfrom
larissa-la:main

Conversation

@larissa-la

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented Jun 17, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mega ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 18, 2025 2:16am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 enhances the repository browser by enabling vertical scrolling, replacing manual README fetch with a blob hook, and adding a commit history panel.

  • Allow page content to scroll instead of being clipped
  • Fetch and render README.md via useGetBlob in both tree and root views
  • Introduce CommitHistory and CommitDetails components with expandable UI

Reviewed Changes

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

Show a summary per file
File Description
moon/apps/web/pages/_app.tsx Commented out unused diff-view stylesheet import
moon/apps/web/pages/[org]/code/tree/[...path]/index.tsx Switched overflow-hidden → overflow-auto, used blob hook, added commit history stub
moon/apps/web/components/CodeView/index.tsx Simplified README fetch using useGetBlob
moon/apps/web/components/CodeView/TreeView/RepoTree.tsx Adjusted tree item label font size inline
moon/apps/web/components/CodeView/TreeView/CloneTabs.tsx Switched to LEGACY_API_URL, removed endpoint use, path replace hardcoded org
moon/apps/web/components/CodeView/CommitHistory.tsx Added expandable commit details logic
moon/apps/web/components/CodeView/CommitDetails.tsx New placeholder component for commit details
moon/apps/web/components/CodeView/CodeTable.tsx Replaced CSS module with inline styles for markdown
Comments suppressed due to low confidence (2)

moon/apps/web/components/CodeView/CommitHistory.tsx:26

  • [nitpick] The flag prop name is vague—consider renaming it to something more descriptive (e.g., viewMode) or adding a comment explaining its permitted values.
export default function CommitHistory({ flag, info }: {flag:string, info: CommitInfo }) {

moon/apps/web/components/CodeView/CommitDetails.tsx:7

  • This placeholder component has repetitive static lines. Add a TODO or implement actual commit detail fields to avoid shipping stub content.
      CommitDetails <br/>

Comment thread moon/apps/web/pages/_app.tsx Outdated
import 'styles/prose.css'
import '@radix-ui/themes/styles.css'
import '@git-diff-view/react/styles/diff-view.css';
// import '@git-diff-view/react/styles/diff-view.css';

Copilot AI Jun 18, 2025

Copy link

Choose a reason for hiding this comment

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

Remove this commented-out import entirely or add a comment explaining why it’s disabled to avoid dead code clutter.

Suggested change
// import '@git-diff-view/react/styles/diff-view.css';
// import '@git-diff-view/react/styles/diff-view.css'; // Disabled because the diff-view feature is not currently in use. Remove this line if the feature is deprecated.

Copilot uses AI. Check for mistakes.
Comment thread moon/apps/web/pages/[org]/code/tree/[...path]/index.tsx
useEffect(() => {
if (endpoint) {
const url = new URL(endpoint)
if (LEGACY_API_URL) {

Copilot AI Jun 18, 2025

Copy link

Choose a reason for hiding this comment

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

The path replacement is hardcoded to '/myorganization/code/tree/'. Consider deriving the org and repo dynamically from route params to support multiple orgs.

Copilot uses AI. Check for mistakes.
import { CheckIcon, CopyIcon, DownloadIcon } from '@gitmono/ui/Icons'
import {LEGACY_API_URL} from '@gitmono/config'

const CloneTabs = ({ endpoint }: any) => {

Copilot AI Jun 18, 2025

Copy link

Choose a reason for hiding this comment

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

The endpoint prop is no longer used inside this component but still appears in the signature and effect deps—please remove it to clean up unused parameters.

Suggested change
const CloneTabs = ({ endpoint }: any) => {
const CloneTabs = () => {

Copilot uses AI. Check for mistakes.
let real_path = pathname?.replace('/tree', '')

const markdownContentStyle = {
margin:' 0 auto',

Copilot AI Jun 18, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] There’s an extra space before the zero in margin:' 0 auto'. Also consider moving repeated inline styles into a shared CSS or styled component for consistency.

Copilot uses AI. Check for mistakes.
@benjamin-747
benjamin-747 added this pull request to the merge queue Jun 18, 2025
Merged via the queue into gitmono-dev:main with commit 9ecaca8 Jun 18, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants