feat: jira view related tickets#33
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements a comprehensive feature for viewing related tickets across Linear and Jira platforms, with significant HTTP infrastructure improvements to support these features.
Key Changes:
- Added Jira issue links display with relationship types and status indicators
- Enhanced Linear ticket links to be clickable in descriptions and comments
- Implemented robust HTTP infrastructure with retry logic, caching, and network monitoring
Reviewed changes
Copilot reviewed 23 out of 25 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| webview-ui/src/shared/utils/markdownRenderer.tsx | Added Linear ticket link detection and rendering as clickable chips in markdown |
| webview-ui/src/linear/ticket-panel/components/TicketDescription.tsx | Added onTicketClick callback support for clickable ticket references |
| webview-ui/src/linear/ticket-panel/components/Comments.tsx | Integrated ticket link clicking in comment bodies |
| webview-ui/src/linear/ticket-panel/App.tsx | Wired up handleOpenIssue to enable ticket navigation from descriptions/comments |
| webview-ui/src/jira/ticket-panel/components/IssueLinksSection.tsx | New component displaying grouped linked issues with status badges and relationship types |
| webview-ui/src/jira/ticket-panel/components/IssueLinksSection.module.css | Styles for the linked issues section |
| webview-ui/src/jira/ticket-panel/App.tsx | Added IssueLinksSection rendering and openLinkedIssue command handler |
| src/shared/views/UniversalTicketsProvider.ts | Improved error handling with user-friendly error messages |
| src/shared/http/index.ts | New exports for HTTP infrastructure modules |
| src/shared/http/TTLCache.ts | New TTL-based cache implementation with LRU eviction |
| src/shared/http/RetryableHttpClient.ts | New HTTP client with exponential backoff retry logic |
| src/shared/http/NetworkMonitor.ts | New network status monitoring with VS Code status bar integration |
| src/providers/linear/LinearClient.ts | Integrated HTTP client with caching and retry support |
| src/providers/jira/server/JiraServerClient.ts | Added cache invalidation and TTL configuration for Jira Server |
| src/providers/jira/common/types.ts | Added JiraIssueLink and JiraIssueLinkType type definitions |
| src/providers/jira/common/BaseJiraClient.ts | Refactored to use RetryableHttpClient with caching support |
| src/providers/jira/cloud/schemas.ts | Added Zod schemas for issue link validation |
| src/providers/jira/cloud/JiraTicketPanel.ts | Added handleOpenLinkedIssue method for navigation |
| src/providers/jira/cloud/JiraCloudClient.ts | Integrated caching and added issue links normalization |
| src/extension.ts | Added cleanup for HTTP infrastructure on deactivation |
| src/activation/treeView.ts | Optimized tree view visibility refresh with debouncing |
| src/activation/initialization.ts | Added network monitor initialization |
| docs/planning/ROADMAP_1.0.0.md | Updated roadmap to reflect completed tasks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Check for Retry-After header on 429 responses | ||
| if (error instanceof HttpError && error.status === 429) { | ||
| const retryAfter = parseRetryAfter( | ||
| (error as any).retryAfterHeader || null |
There was a problem hiding this comment.
Using (error as any) bypasses type safety. Consider adding retryAfterHeader as an optional property to the HttpError class instead of using type assertion.
| (error as any).retryAfterHeader || null | |
| (error as HttpErrorWithRetryAfter).retryAfterHeader ?? null |
|
|
||
| // Attach Retry-After header for 429 responses | ||
| if (response.status === 429) { | ||
| (error as any).retryAfterHeader = response.headers.get("Retry-After"); |
There was a problem hiding this comment.
Using (error as any) to attach a property bypasses type safety. Consider adding retryAfterHeader as an optional property to the HttpError class.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot open a new pull request to apply changes based on the comments in this thread without failing type-check or linting |
|
@angelo-hub I've opened a new pull request, #34, to work on those changes. Once the pull request is ready, I'll request review from you. |
- Added retryAfterHeader as optional property to HttpError class instead of using type assertions - Updated line 324 to use error.retryAfterHeader instead of (error as any).retryAfterHeader - Updated error instantiation to pass retryAfterHeader in constructor instead of attaching it afterwards - Addresses type safety issues raised in PR review comments Co-authored-by: angelo-hub <12058178+angelo-hub@users.noreply.github.com>
fix: replace type assertions with proper HttpError property
No description provided.