Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export const IssueBlockRoot = observer(function IssueBlockRoot(props: Props) {
root={containerRef}
classNames={`relative ${isLastChild && !isExpanded ? "" : "border-b border-b-subtle"}`}
verticalOffset={100}
defaultValue={shouldRenderByDefault || isIssueNew(issuesMap[issueId])}
defaultValue={shouldRenderByDefault || (issuesMap[issueId] ? isIssueNew(issuesMap[issueId]) : false)}
placeholderChildren={<ListLoaderItemRow shouldAnimate={false} renderForPlaceHolder defaultPropertyCount={4} />}
Comment on lines 140 to 142
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

IssueBlockRoot already returns early when issuesMap[issueId]?.created_at is falsy, so issuesMap[issueId] is guaranteed to exist at this point. The added ternary is redundant and also repeats the map lookup. Consider keeping the previous isIssueNew(issuesMap[issueId]) call, or assign const issue = issuesMap[issueId] after the guard and use that variable for clarity.

Copilot uses AI. Check for mistakes.
shouldRecordHeights={isMobile}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,13 @@ export const SpreadsheetIssueRow = observer(function SpreadsheetIssueRow(props:
const { issueMap } = useIssues();

// derived values
const issue = issueMap[issueId];
const subIssues = subIssuesStore.subIssuesByIssueId(issueId);
const isIssueSelected = selectionHelpers.getIsEntitySelected(issueId);
const isIssueActive = selectionHelpers.getIsEntityActive(issueId);

if (!issue) return null;

return (
<>
{/* first column/ issue name and key column */}
Expand All @@ -104,7 +107,7 @@ export const SpreadsheetIssueRow = observer(function SpreadsheetIssueRow(props:
})}
verticalOffset={100}
shouldRecordHeights={false}
defaultValue={shouldRenderByDefault || isIssueNew(issueMap[issueId])}
defaultValue={shouldRenderByDefault || isIssueNew(issue)}
>
<IssueRowDetails
issueId={issueId}
Expand Down
Loading