Skip to content

Conversation

@juanlou1217
Copy link
Contributor

  • Provide editing and Diff preview modes
  • Support file renaming feature
  • Fix blame timeline
  • Fix lastCommit avatar display

 - Provide editing and Diff preview modes
 - Support file renaming feature
 - Fix blame timeline
 - Fix lastCommit avatar display
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 refactors the API types to simplify commit and blame information structures, removing redundant user details in favor of simple usernames, and adds a new blob editing feature with diff preview capabilities.

Key Changes

  • Simplified blame and commit information structures by replacing complex user objects with simple username/time fields
  • Removed the UserInfo type and replaced nested objects with string usernames
  • Added blob editing functionality with a new BlobEditor component and supporting hooks

Reviewed Changes

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

Show a summary per file
File Description
moon/packages/types/generated.ts Simplified BlameInfo, CommitBindingResponse, and LatestCommitInfo types; removed UserInfo type
moon/apps/web/hooks/useUpdateBlob.ts New hook for updating blob content with query invalidation
moon/apps/web/hooks/useDiffPreview.ts New hook for generating diff previews
moon/apps/web/components/CodeView/CommitHistory.tsx Updated to use simplified LatestCommitInfo with username strings and fetch member data separately
moon/apps/web/components/CodeView/BlobView/CodeContent.tsx Added edit mode state, BlobEditor integration, and updated blame field references
moon/apps/web/components/CodeView/BlobView/BlobEditor.tsx New component providing inline file editing with diff preview and commit dialog

type='text'
value={editedFileName}
onChange={(e) => setEditedFileName(e.target.value)}
placeholder='fileName'
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

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

Placeholder text should use proper spacing: 'File name' instead of 'fileName' for better user experience.

Suggested change
placeholder='fileName'
placeholder='File name'

Copilot uses AI. Check for mistakes.
type='text'
value={commitMessage}
onChange={(e) => setCommitMessage(e.target.value)}
placeholder={`update ${fileName}`}
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

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

Placeholder text should be capitalized: 'Update' instead of 'update' to maintain consistency with the commit message label.

Suggested change
placeholder={`update ${fileName}`}
placeholder={`Update ${fileName}`}

Copilot uses AI. Check for mistakes.
@benjamin-747 benjamin-747 added this pull request to the merge queue Oct 30, 2025
Merged via the queue into web3infra-foundation:main with commit d9179c8 Oct 30, 2025
3 checks passed
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