Skip to content

Misc fixes & improvements#173

Merged
stylessh merged 2 commits intomainfrom
tembo/fix-common-diffkit-issues-misc-pr
Apr 23, 2026
Merged

Misc fixes & improvements#173
stylessh merged 2 commits intomainfrom
tembo/fix-common-diffkit-issues-misc-pr

Conversation

@tembo
Copy link
Copy Markdown
Contributor

@tembo tembo Bot commented Apr 23, 2026

Summary

Miscellaneous bug fixes and improvements across the dashboard:

  1. Added viewport loading component - New DashboardViewportLoading component for full-viewport pending states when routes render directly in the document body
  2. Improved repository name display - Split owner/name in RepositoryRow to prevent long owner logins from hiding repo names (fixes Bug: Repository page truncates repo name when owner login is long #154)
  3. Enhanced loading state documentation - Added comprehensive JSDoc comments explaining when to use DashboardContentLoading vs DashboardViewportLoading
  4. Integrated pending fallback - Connected DashboardViewportLoading as the pending component for the _protected route

Changes

  • Added DashboardViewportLoading export to dashboard-content-loading.tsx with full-viewport centering using min-h-dvh
  • Updated RepositoryRow to display repo owner and name separately with proper truncation behavior
  • Added pendingComponent to _protected route configuration
  • Added JSDoc documentation for both loading components

Test Plan

  • Verify loading spinner appears centered when _protected route is pending
  • Confirm long repository owner names truncate without hiding repo name
  • Test responsive behavior on various viewport sizes
  • Verify loading states work correctly on route transitions

Screenshots

Before After
Long owner names could hide repo name Owner truncates, repo name always visible

Want tembo to make any changes? Add a review or comment with @tembo and i'll get back to work!

View on Tembo View Agent Settings

Summary by CodeRabbit

  • New Features
    • Introduced viewport-filling loading indicator with spinner for improved visual feedback during dashboard page transitions
    • Enhanced repository row display to show owner/name format for better clarity and organization
    • Improved comment editor workflow with automatic text field focus when opened

… in rows

Co-authored-by: Alan <45767683+stylessh@users.noreply.github.com>
@tembo tembo Bot added the tembo Pull request created by Tembo label Apr 23, 2026
@tembo
Copy link
Copy Markdown
Contributor Author

tembo Bot commented Apr 23, 2026

Requesting review from @stylessh who has experience with the following files modified in this PR:

  • apps/dashboard/src/routes/_protected.tsx
  • apps/dashboard/src/components/repo/repository-row.tsx
  • apps/dashboard/src/components/layouts/dashboard-content-loading.tsx

@tembo tembo Bot requested a review from stylessh April 23, 2026 00:57
Comment on lines +3 to +12
/**
* Pending component used for routes rendered inside the dashboard card
* (`DashboardLayout`). The `h-full` chain resolves against the card so the
* spinner stays visually centered within the content area.
*
* For top-level pending fallbacks where the parent is just `<body>` (e.g.
* when `_protected` itself is reloading), use `DashboardViewportLoading`
* instead — `h-full` there collapses to content height and pins the spinner
* to the top of the viewport.
*/
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

remove all these unnecessary comments

Comment on lines +21 to +26
/**
* Full-viewport pending component. Use for route pending states that render
* directly inside the document body (where no ancestor provides a resolved
* height). Keeps the spinner centered regardless of how little content the
* layout has yet rendered.
*/
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

same here

Comment on lines +138 to +143
{/*
* Split owner/name so a long owner login doesn't consume all the
* space and hide the repo name. The owner takes flexible space and
* truncates first; the repo name stays readable at its natural
* size. See diffkit#154.
*/}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

same here

…iate input

Co-authored-by: Alan <45767683+stylessh@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

A new viewport-filling loading component (DashboardViewportLoading) is added and integrated into the protected route. The inline comment form now auto-focuses its textarea, and the repository row display is restructured to show owner and repo name separately for improved readability.

Changes

Cohort / File(s) Summary
Loading UI and Route Configuration
apps/dashboard/src/components/layouts/dashboard-content-loading.tsx, apps/dashboard/src/routes/_protected.tsx
Introduces a new DashboardViewportLoading component that renders a centered spinner in a viewport-height container with background. The protected route now uses this component as its pendingComponent during loading states.
Inline Comment Form
apps/dashboard/src/components/pulls/review/review-file-diff-block.tsx
Adds a textarea reference to InlineCommentForm and implements auto-focus behavior via useEffect on initial render. The reference is forwarded to MarkdownEditor through a new textareaRef prop.
Repository Display
apps/dashboard/src/components/repo/repository-row.tsx
Restructures the repository label display to show owner and repo name as separate truncated segments with a fixed / separator using baseline alignment, addressing truncation issues with long owner names.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The changes to review-file-diff-block.tsx (autofocus textarea) are out of scope as they are not mentioned in the PR objectives and unrelated to the linked issues. Remove the autofocus textarea changes from review-file-diff-block.tsx or create a separate PR for this textarea autofocus improvement.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Misc fixes & improvements' is vague and generic, using non-descriptive terms that don't convey meaningful information about the specific changes. Use a more specific title that highlights the primary change, such as 'Add viewport loading component and fix repository name truncation'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The PR description is comprehensive and follows the template structure with Summary, Changes, Test Plan, and Screenshots sections, providing clear details about all modifications.
Linked Issues check ✅ Passed The PR successfully addresses issue #154 by modifying RepositoryRow to display owner and name separately with proper truncation, preventing long owner names from hiding repo names.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tembo/fix-common-diffkit-issues-misc-pr

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Owner

@stylessh stylessh left a comment

Choose a reason for hiding this comment

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

LGTM

@stylessh stylessh merged commit 6c2b8f0 into main Apr 23, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tembo Pull request created by Tembo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Repository page truncates repo name when owner login is long

1 participant