Skip to content

Ship Linear pane loading fixes and new Files workbench#521

Merged
arul28 merged 2 commits into
mainfrom
ade/linear-pane-ui-ticket-loading-8783d132
Jun 2, 2026
Merged

Ship Linear pane loading fixes and new Files workbench#521
arul28 merged 2 commits into
mainfrom
ade/linear-pane-ui-ticket-loading-8783d132

Conversation

@arul28
Copy link
Copy Markdown
Owner

@arul28 arul28 commented Jun 2, 2026

Summary

Describe the change.

What Changed

Key files and behaviors.

Validation

How you tested.

Risks

Anything to watch.

ADE   Open in ADE  ·  ade/linear-pane-ui-ticket-loading-8783d132 branch  ·  PR #521

Summary by CodeRabbit

  • New Features

    • Improved infinite-scroll behavior for issue browsing with automatic loading as you approach the list end.
    • Enhanced issue description rendering with richer formatting support.
    • Browser view now properly hides when overlays are active and restores visibility when closed.
  • Improvements

    • Increased modal and dialog window sizes for better content visibility.
    • Refactored issue properties display for improved layout.
  • Tests

    • Added test coverage for browser occlusion behavior.

Greptile Summary

This PR ships two changes: Linear pane UX improvements (infinite-scroll paging, richer markdown rendering, a refactored issue properties panel, and browser-view occlusion fixes for when modals are open) and the permanent promotion of the v2 FilesWorkbench by removing the filesWorkbenchFlag feature gate and deleting the legacy FilesPage.

  • Linear pane loading: Adds IntersectionObserver-based auto-paging with an AUTO_LOAD_MAX_ISSUES=500 soft cap, bumps page size to 100, introduces a LinearMarkdown component reusing the chat markdown stack, and refactors IssueDetails into a cleaner IssueProperties table layout. An appendingMore flag separates the append spinner from the full-reload spinner.
  • Browser occlusion: Adds reference-counted ADE_BROWSER_VIEW_OCCLUSION_START/END events so the native browser view is hidden whenever any Linear overlay (quick-view or full modal) is open, and only restored once all overlays are dismissed. Covered by a new test in ChatBuiltInBrowserPanel.test.tsx.
  • Files workbench GA: Removes the localStorage feature flag, deletes FilesPage.tsx (~3200 lines) and its test file, and makes FilesTab unconditionally render FilesWorkbench.

Confidence Score: 5/5

Safe to merge — all changed logic is additive, well-guarded, and covered by tests.

The infinite-scroll implementation correctly uses a ref-refresh pattern to avoid stale closures in the IntersectionObserver callback, and the appendingMore flag is kept in sync with the append-only in-flight state. The reference-counted occlusion suppression handles concurrent modals without leaks. The FilesPage deletion is a clean GA promotion with no remaining references in source code.

No files require special attention.

Important Files Changed

Filename Overview
apps/desktop/src/renderer/components/app/LinearIssueBrowser.tsx Adds infinite-scroll paging (IntersectionObserver + sentinel) with AUTO_LOAD_MAX_ISSUES=500 cap, bumps page size to 100, introduces LinearMarkdown with full markdown components, and refactors IssueDetails into IssueProperties. Logic is sound: pageInfoRef synced via useEffect, autoLoadMoreRef refreshed every render, appendingMore tracks append-only in-flight state.
apps/desktop/src/renderer/components/chat/ChatBuiltInBrowserPanel.tsx Adds a reference-counted suppression counter (browserViewSuppressionCountRef) and subscribes to new occlusion events, so the native browser view is hidden whenever any overlay is active and only restored when all overlays are closed.
apps/desktop/src/renderer/lib/workSidebarBrowserResize.ts Exports two new event-name constants for browser-view occlusion start/end, no logic change.
apps/desktop/src/renderer/components/app/LinearPaneModal.tsx Fires occlusion start/end events on mount/unmount when open, and bumps modal size from 1380x900 to 1760x940.
apps/desktop/src/renderer/components/app/LinearQuickViewButton.tsx Combines open and batchModalOpen into occludesNativeBrowser to fire a single occlusion start/end pair; bumps modal size to match LinearPaneModal.
apps/desktop/src/renderer/components/files/FilesTab.tsx Removes the filesWorkbenchFlag branch; FilesTab now unconditionally renders FilesWorkbench. All downstream references to FilesPage and the flag file have been cleaned up.
apps/desktop/src/renderer/components/files/filesWorkbenchFlag.ts Deleted — feature flag no longer needed now that FilesWorkbench is the sole implementation.
apps/desktop/src/renderer/components/chat/ChatBuiltInBrowserPanel.test.tsx Adds a test verifying that nested occlusion events correctly keep the browser hidden until all overlays close (reference-count semantics). Test logic matches the implementation.

Sequence Diagram

sequenceDiagram
    participant User
    participant LinearIssueBrowser
    participant IntersectionObserver
    participant searchIssues
    participant LinearPaneModal/QuickViewButton
    participant ChatBuiltInBrowserPanel

    User->>LinearIssueBrowser: scrolls issue list
    IntersectionObserver->>LinearIssueBrowser: sentinel intersects (rootMargin 400px)
    LinearIssueBrowser->>LinearIssueBrowser: autoLoadMoreRef.current()
    alt "issues < AUTO_LOAD_MAX_ISSUES (500) and hasNextPage"
        LinearIssueBrowser->>searchIssues: "searchIssues(append=true)"
        searchIssues->>LinearIssueBrowser: setAppendingMore(true)
        searchIssues-->>LinearIssueBrowser: resolve, mergeIssuePages, setAppendingMore(false)
    else "issues >= 500"
        LinearIssueBrowser->>User: shows Load more button
    end

    User->>LinearPaneModal/QuickViewButton: opens modal
    LinearPaneModal/QuickViewButton->>ChatBuiltInBrowserPanel: ADE_BROWSER_VIEW_OCCLUSION_START
    ChatBuiltInBrowserPanel->>ChatBuiltInBrowserPanel: "suppressionCount++, setBounds(visible=false)"
    User->>LinearPaneModal/QuickViewButton: closes modal
    LinearPaneModal/QuickViewButton->>ChatBuiltInBrowserPanel: ADE_BROWSER_VIEW_OCCLUSION_END
    ChatBuiltInBrowserPanel->>ChatBuiltInBrowserPanel: "suppressionCount--, if 0 setBounds(visible=true)"
Loading

Reviews (3): Last reviewed commit: "ship: iteration 1 - remove legacy Files ..." | Re-trigger Greptile

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Preview Jun 2, 2026 10:44pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds a browser view occlusion event system to manage native browser visibility when Linear overlay modals open, and significantly enhances the Linear issue browser with automatic infinite scroll pagination, rich markdown rendering of issue descriptions, and a refactored properties display.

Changes

Browser View Occlusion Event System

Layer / File(s) Summary
Event constants and modal dispatch points
apps/desktop/src/renderer/lib/workSidebarBrowserResize.ts, apps/desktop/src/renderer/components/app/LinearPaneModal.tsx, apps/desktop/src/renderer/components/app/LinearQuickViewButton.tsx
Exported ADE_BROWSER_VIEW_OCCLUSION_START_EVENT and ADE_BROWSER_VIEW_OCCLUSION_END_EVENT constants. LinearPaneModal and LinearQuickViewButton dispatch these events when their overlays are shown/hidden, with increased sizing constraints for the expanded UI.
Native browser suppression and visibility control
apps/desktop/src/renderer/components/chat/ChatBuiltInBrowserPanel.tsx
ChatBuiltInBrowserPanel listens for occlusion events via a new browserViewSuppressionCountRef that tracks nested/overlapping suppressions, keeping the native browser hidden and input suppressed while any overlay is active.
Occlusion event test coverage
apps/desktop/src/renderer/components/chat/ChatBuiltInBrowserPanel.test.tsx
Added test verifying native browser visibility is toggled off during occlusion and restored after all occlusion events complete.

LinearIssueBrowser Infinite Scroll and Markdown Rendering

Layer / File(s) Summary
Paging constants and search configuration
apps/desktop/src/renderer/components/app/LinearIssueBrowser.tsx
Introduced ISSUE_PAGE_SIZE and AUTO_LOAD_MAX_ISSUES constants to standardize pagination. Updated buildIssueSearchArgs and cache key generation to use dynamic first values and adjusted responsive grid column widths.
Custom markdown component stack
apps/desktop/src/renderer/components/app/LinearIssueBrowser.tsx
Defined LINEAR_MARKDOWN_COMPONENTS with custom heading styles and Linear-accent link handling, and created LinearMarkdown wrapper integrating GFM and sanitization for rich issue description rendering.
Infinite scroll observer and fetch logic
apps/desktop/src/renderer/components/app/LinearIssueBrowser.tsx
Added scroll refs (issuesScrollRef, loadMoreSentinelRef), appendingMore state flag, and autoLoadMoreRef closure. Implemented IntersectionObserver effect to detect when the sentinel element nears the viewport and trigger additional fetches, with loading state management and max-issues cap enforcement.
Issue details pane markdown and properties refactoring
apps/desktop/src/renderer/components/app/LinearIssueBrowser.tsx
Reworked issue details to render descriptions via LinearMarkdown and refactored IssueProperties using a new PropRow helper to display status, priority, assignee, project, team, cycle, creator, estimate, dates, and optional branch info.

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • arul28/ADE#373: Modifies LinearIssueBrowser.tsx with overlapping changes to issue details rendering and markdown display UI (also adds selection/batch actions).
  • arul28/ADE#395: Touches pagination and issue search loading flow in LinearIssueBrowser.tsx and LinearQuickViewButton.tsx.
  • arul28/ADE#368: Modifies Linear issue browser and quick-view UI components with related changes to issue resolution flows.

Suggested labels

desktop

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% 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 mentions 'Linear pane loading fixes' which aligns with commit message and the primary changes to LinearIssueBrowser infinite-scroll behavior; however, 'new Files workbench' is not reflected in the provided changeset summary. Clarify whether the 'new Files workbench' component is included in this PR or if the title should be narrowed to focus only on the Linear pane loading and browser layering improvements shown in the changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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 ade/linear-pane-ui-ticket-loading-8783d132

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@arul28
Copy link
Copy Markdown
Owner Author

arul28 commented Jun 2, 2026

@copilot review but do not make fixes

Comment thread apps/desktop/src/renderer/components/app/LinearIssueBrowser.tsx
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/desktop/src/renderer/components/app/LinearIssueBrowser.tsx`:
- Around line 437-448: The anchor renderer currently calls
openUrlInAdeBrowser(href) without checking href; update the onClick handler in
the anchor render function to first preventDefault() and then only call
openUrlInAdeBrowser if href is a non-empty string (e.g., typeof href ===
"string" && href.trim() !== ""), so malformed or undefined href values are
ignored and no undefined is passed into openUrlInAdeBrowser; keep the same
className and children usage and only change the onClick guard logic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2e6be4e4-f332-4890-a2da-45076225afc1

📥 Commits

Reviewing files that changed from the base of the PR and between 2a42867 and ddf1a83.

📒 Files selected for processing (6)
  • apps/desktop/src/renderer/components/app/LinearIssueBrowser.tsx
  • apps/desktop/src/renderer/components/app/LinearPaneModal.tsx
  • apps/desktop/src/renderer/components/app/LinearQuickViewButton.tsx
  • apps/desktop/src/renderer/components/chat/ChatBuiltInBrowserPanel.test.tsx
  • apps/desktop/src/renderer/components/chat/ChatBuiltInBrowserPanel.tsx
  • apps/desktop/src/renderer/lib/workSidebarBrowserResize.ts

Comment thread apps/desktop/src/renderer/components/app/LinearIssueBrowser.tsx
@arul28
Copy link
Copy Markdown
Owner Author

arul28 commented Jun 2, 2026

@copilot review but do not make fixes

@arul28 arul28 force-pushed the ade/linear-pane-ui-ticket-loading-8783d132 branch from dbb20b3 to e5a5a25 Compare June 2, 2026 22:44
@arul28
Copy link
Copy Markdown
Owner Author

arul28 commented Jun 2, 2026

@copilot review but do not make fixes

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