;
export interface HistoryTableReducerState {
@@ -29,6 +31,7 @@ export interface HistoryTableReducerState {
columns: string[];
columnLimit: number;
commitCount: number;
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
loadedCommits: mainlineCommits["versions"];
pageCount: number;
processedCommits: CommitRowType[];
@@ -58,26 +61,33 @@ export const reducer = (state: HistoryTableReducerState, action: Action) => {
// This also performantly handles deduplication of commits at the expense of memory
const updatedObjectCache = objectifyCommits(
state.commitCache,
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
action.commits.versions,
);
if (updatedObjectCache.size > state.commitCache.size) {
// Check if our selected commit has been loaded
const { processedCommits, selectedCommitRowIndex } = processCommits({
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
newCommits: action.commits.versions,
existingCommits: state.processedCommits,
selectedCommitOrder: state.selectedCommit?.order,
});
let { commitCount } = state;
// If there are no previous commits, we can set the commitCount to be the first commit's order.
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
if (action.commits.prevPageOrderNumber == null) {
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
for (let i = 0; i < action.commits.versions.length; i++) {
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
if (action.commits.versions[i].version) {
// We set the commitCount to double the order number just so we have room for non commit rows (date separators) and (folded commits)
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
commitCount = action.commits.versions[i].version.order * 2;
break;
}
}
// if we have no more commits we have processed everything and know how many commits we have so set the value to that
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
} else if (action.commits.nextPageOrderNumber == null) {
commitCount = processedCommits.length;
}
@@ -214,13 +224,16 @@ export const reducer = (state: HistoryTableReducerState, action: Action) => {
// This is used to performantly track if we have seen a commit before and avoid duplicating it
const objectifyCommits = (
cache: cacheShape,
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
newCommits: mainlineCommits["versions"],
) => {
const obj = new Map(cache);
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
newCommits.forEach((commit) => {
if (commit.version) {
obj.set(commit.version.order, commit.version);
} else if (commit.rolledUpVersions) {
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
commit.rolledUpVersions.forEach((version) => {
obj.set(version.order, version);
});
@@ -234,6 +247,7 @@ const commitOrderToRowIndex = (order: number, commit: CommitRowType) => {
return commit.commit.order === order;
}
if (commit.type === rowType.FOLDED_COMMITS) {
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
return commit.rolledUpCommits.some((elem) => elem.order === order);
}
return false;
diff --git a/apps/spruce/src/components/HistoryTable/hooks/test-utils.tsx b/apps/spruce/src/components/HistoryTable/hooks/test-utils.tsx
index aae17911c..5ae494a40 100644
--- a/apps/spruce/src/components/HistoryTable/hooks/test-utils.tsx
+++ b/apps/spruce/src/components/HistoryTable/hooks/test-utils.tsx
@@ -14,6 +14,7 @@ const initialState: HistoryTableReducerState = {
commitCount: 10,
visibleColumns: [],
columnLimit: 7,
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
selectedCommit: null,
};
diff --git a/apps/spruce/src/components/HistoryTable/hooks/useColumns.ts b/apps/spruce/src/components/HistoryTable/hooks/useColumns.ts
index 5132c045a..20ce531e4 100644
--- a/apps/spruce/src/components/HistoryTable/hooks/useColumns.ts
+++ b/apps/spruce/src/components/HistoryTable/hooks/useColumns.ts
@@ -13,6 +13,7 @@ const useColumns =
(allColumns: T[], accessFunc: (column: T) => string) => {
() => parseQueryString(search),
[search],
);
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
const { addColumns } = useHistoryTable();
const selectedColumnsInQuery = useMemo(
diff --git a/apps/spruce/src/components/HistoryTable/hooks/useJumpToCommit.ts b/apps/spruce/src/components/HistoryTable/hooks/useJumpToCommit.ts
index 525f712dd..977a33600 100644
--- a/apps/spruce/src/components/HistoryTable/hooks/useJumpToCommit.ts
+++ b/apps/spruce/src/components/HistoryTable/hooks/useJumpToCommit.ts
@@ -15,6 +15,7 @@ const useJumpToCommit = () => {
const skipOrderNumber =
parseInt(getString(skipOrderNumberParam), 10) || undefined;
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
const { setSelectedCommit } = useHistoryTable();
useEffect(() => {
if (skipOrderNumber) {
diff --git a/apps/spruce/src/components/HistoryTable/hooks/useTestFilters.tsx b/apps/spruce/src/components/HistoryTable/hooks/useTestFilters.tsx
index 4c2dd1009..7880e21b9 100644
--- a/apps/spruce/src/components/HistoryTable/hooks/useTestFilters.tsx
+++ b/apps/spruce/src/components/HistoryTable/hooks/useTestFilters.tsx
@@ -9,6 +9,7 @@ const { toArray } = array;
const useTestFilters = () => {
const { search } = useLocation();
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
const { setHistoryTableFilters } = useHistoryTable();
useEffect(() => {
const queryParams = parseQueryString(search);
diff --git a/apps/spruce/src/components/HistoryTable/hooks/useTestResults.test.tsx b/apps/spruce/src/components/HistoryTable/hooks/useTestResults.test.tsx
index 07449d055..ef4842b25 100644
--- a/apps/spruce/src/components/HistoryTable/hooks/useTestResults.test.tsx
+++ b/apps/spruce/src/components/HistoryTable/hooks/useTestResults.test.tsx
@@ -49,9 +49,12 @@ describe("useTestResults", () => {
failingTests: [],
});
act(() => {
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
result.current.historyTable.ingestNewCommits(mainlineCommitData);
});
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
expect(result.current.historyTable.processedCommitCount).toBe(9);
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
expect(result.current.historyTable.getItem(0)).toMatchObject({
type: rowType.DATE_SEPARATOR,
});
@@ -78,9 +81,12 @@ describe("useTestResults", () => {
failingTests: [],
});
act(() => {
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
result.current.historyTable.ingestNewCommits(mainlineCommitData);
});
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
expect(result.current.historyTable.processedCommitCount).toBe(9);
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
expect(result.current.historyTable.getItem(2)).toMatchObject({
type: rowType.COMMIT,
});
@@ -113,13 +119,17 @@ describe("useTestResults", () => {
loading: false,
});
act(() => {
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
result.current.historyTable.ingestNewCommits(mainlineCommitData);
});
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
expect(result.current.historyTable.processedCommitCount).toBe(9);
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
expect(result.current.historyTable.getItem(2)).toMatchObject({
type: rowType.COMMIT,
});
act(() => {
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
result.current.historyTable.setHistoryTableFilters([
{ testName: "TestJiraIntegration", testStatus: TestStatus.Failed },
]);
@@ -152,13 +162,17 @@ describe("useTestResults", () => {
failingTests: [],
});
act(() => {
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
result.current.historyTable.ingestNewCommits(mainlineCommitData);
});
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
expect(result.current.historyTable.processedCommitCount).toBe(9);
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
expect(result.current.historyTable.getItem(2)).toMatchObject({
type: rowType.COMMIT,
});
act(() => {
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
result.current.historyTable.setHistoryTableFilters([
{ testName: "NotARealTest", testStatus: TestStatus.Failed },
]);
diff --git a/apps/spruce/src/components/HistoryTable/hooks/useTestResults.ts b/apps/spruce/src/components/HistoryTable/hooks/useTestResults.ts
index b31a62b87..0a38aad65 100644
--- a/apps/spruce/src/components/HistoryTable/hooks/useTestResults.ts
+++ b/apps/spruce/src/components/HistoryTable/hooks/useTestResults.ts
@@ -18,6 +18,7 @@ const { convertArrayToObject } = array;
* @returns getTaskMetadata - a function that given a task id returns the test results for that task
*/
const useTestResults = (rowIndex: number) => {
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
const { getItem, historyTableFilters } = useHistoryTable();
let taskIds: string[] = [];
let versionId = "";
@@ -28,7 +29,9 @@ const useTestResults = (rowIndex: number) => {
const commit = getItem(rowIndex);
if (commit && commit.type === rowType.COMMIT && commit.commit) {
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
taskIds = commit.commit.buildVariants.flatMap((buildVariant) =>
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
buildVariant.tasks.map((task) => task.id),
);
versionId = commit.commit.id;
diff --git a/apps/spruce/src/components/HistoryTable/types.ts b/apps/spruce/src/components/HistoryTable/types.ts
index 6148f5178..7ea975669 100644
--- a/apps/spruce/src/components/HistoryTable/types.ts
+++ b/apps/spruce/src/components/HistoryTable/types.ts
@@ -3,6 +3,7 @@ import { Unpacked } from "types/utils";
export interface FoldedCommitsRow {
type: rowType.FOLDED_COMMITS;
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
rolledUpCommits: Unpacked["rolledUpVersions"];
date: Date;
selected: boolean;
@@ -17,6 +18,7 @@ export interface DateSeparatorRow {
export interface CommitRow {
type: rowType.COMMIT;
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
commit: Unpacked["version"];
date: Date;
selected: boolean;
diff --git a/apps/spruce/src/components/HistoryTable/utils.test.ts b/apps/spruce/src/components/HistoryTable/utils.test.ts
index 5f67bdce5..057cd9ec0 100644
--- a/apps/spruce/src/components/HistoryTable/utils.test.ts
+++ b/apps/spruce/src/components/HistoryTable/utils.test.ts
@@ -31,11 +31,13 @@ describe("historyTable utils", () => {
});
expect(processedCommits).toStrictEqual([
{
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: firstCommit.version.createTime,
type: rowType.DATE_SEPARATOR,
},
{
commit: firstCommit.version,
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: firstCommit.version.createTime,
type: rowType.COMMIT,
selected: false,
@@ -55,17 +57,20 @@ describe("historyTable utils", () => {
});
expect(processedCommits).toStrictEqual([
{
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: firstCommit.version.createTime,
type: rowType.DATE_SEPARATOR,
},
{
commit: firstCommit.version,
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: firstCommit.version.createTime,
type: rowType.COMMIT,
selected: false,
},
{
commit: secondCommit.version,
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: secondCommit.version.createTime,
type: rowType.COMMIT,
selected: false,
@@ -80,21 +85,25 @@ describe("historyTable utils", () => {
});
expect(processedCommits).toStrictEqual([
{
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: firstCommit.version.createTime,
type: rowType.DATE_SEPARATOR,
},
{
commit: firstCommit.version,
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: firstCommit.version.createTime,
type: rowType.COMMIT,
selected: false,
},
{
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: thirdCommit.version.createTime,
type: rowType.DATE_SEPARATOR,
},
{
commit: thirdCommit.version,
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: thirdCommit.version.createTime,
type: rowType.COMMIT,
selected: false,
@@ -114,11 +123,13 @@ describe("historyTable utils", () => {
});
expect(processedCommits).toStrictEqual([
{
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: foldedUpCommits.rolledUpVersions[0].createTime,
type: rowType.DATE_SEPARATOR,
},
{
rolledUpCommits: foldedUpCommits.rolledUpVersions,
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: foldedUpCommits.rolledUpVersions[0].createTime,
type: rowType.FOLDED_COMMITS,
selected: false,
@@ -131,11 +142,13 @@ describe("historyTable utils", () => {
newCommits: [foldedUpCommits],
existingCommits: [
{
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: firstCommit.version.createTime,
type: rowType.DATE_SEPARATOR,
},
{
commit: firstCommit.version,
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: firstCommit.version.createTime,
type: rowType.COMMIT,
selected: false,
@@ -145,21 +158,25 @@ describe("historyTable utils", () => {
});
expect(processedCommits).toStrictEqual([
{
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: firstCommit.version.createTime,
type: rowType.DATE_SEPARATOR,
},
{
commit: firstCommit.version,
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: firstCommit.version.createTime,
type: rowType.COMMIT,
selected: false,
},
{
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: foldedUpCommits.rolledUpVersions[0].createTime,
type: rowType.DATE_SEPARATOR,
},
{
rolledUpCommits: foldedUpCommits.rolledUpVersions,
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: foldedUpCommits.rolledUpVersions[0].createTime,
type: rowType.FOLDED_COMMITS,
selected: false,
@@ -178,11 +195,13 @@ describe("historyTable utils", () => {
});
expect(processedCommits).toStrictEqual([
{
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: mainlineCommitData.versions[0].version.createTime,
type: rowType.DATE_SEPARATOR,
},
{
commit: mainlineCommitData.versions[0].version,
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: mainlineCommitData.versions[0].version.createTime,
type: rowType.COMMIT,
selected: true,
@@ -198,11 +217,13 @@ describe("historyTable utils", () => {
});
expect(processedCommits).toStrictEqual([
{
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: mainlineCommitData.versions[0].version.createTime,
type: rowType.DATE_SEPARATOR,
},
{
commit: mainlineCommitData.versions[0].version,
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
date: mainlineCommitData.versions[0].version.createTime,
type: rowType.COMMIT,
diff --git a/apps/spruce/src/components/HistoryTable/utils.ts b/apps/spruce/src/components/HistoryTable/utils.ts
index 0ce869edb..6f5cb58ed 100644
--- a/apps/spruce/src/components/HistoryTable/utils.ts
+++ b/apps/spruce/src/components/HistoryTable/utils.ts
@@ -14,6 +14,7 @@ export const processCommits = ({
newCommits,
selectedCommitOrder,
}: {
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
newCommits: mainlineCommits["versions"];
existingCommits: CommitRowType[];
selectedCommitOrder: number | null;
@@ -101,6 +102,7 @@ export const processCommits = ({
return { processedCommits, selectedCommitRowIndex };
};
+// @ts-expect-error: FIXME. This comment was added by an automated script.
const identifyCommitType = (commit: mainlineCommits["versions"][0]) => {
if (commit.version) {
return rowType.COMMIT;
@@ -122,6 +124,7 @@ const isSameDay = (date1: string | Date, date2: string | Date) => {
};
const hasSelectedCommit = (
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
rolledUpUpVersions: Unpacked["rolledUpVersions"],
selectedCommitOrder: number | null,
) => {
@@ -129,6 +132,7 @@ const hasSelectedCommit = (
return false;
}
return rolledUpUpVersions.some(
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
(version) => version.order === selectedCommitOrder,
);
};
diff --git a/apps/spruce/src/components/HostStatusBadge/HostStatusBadge.stories.tsx b/apps/spruce/src/components/HostStatusBadge/HostStatusBadge.stories.tsx
index 57cae3729..c3daed33e 100644
--- a/apps/spruce/src/components/HostStatusBadge/HostStatusBadge.stories.tsx
+++ b/apps/spruce/src/components/HostStatusBadge/HostStatusBadge.stories.tsx
@@ -14,6 +14,7 @@ export const Default: CustomStoryObj = {
{Object.keys(HostStatus).map((status) => (
+ {/* @ts-expect-error: FIXME. This comment was added by an automated script. */}
))}
diff --git a/apps/spruce/src/components/Hosts/UpdateStatusModal.tsx b/apps/spruce/src/components/Hosts/UpdateStatusModal.tsx
index 56312c7e6..09dbfcea0 100644
--- a/apps/spruce/src/components/Hosts/UpdateStatusModal.tsx
+++ b/apps/spruce/src/components/Hosts/UpdateStatusModal.tsx
@@ -31,6 +31,7 @@ export const UpdateStatusModal: React.FC = ({
}) => {
const dispatchToast = useToastContext();
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
const [status, setHostStatus] = useState(null);
const [notes, setNotesValue] = useState("");
@@ -38,6 +39,7 @@ export const UpdateStatusModal: React.FC = ({
const hostsTableAnalytics = useHostsTableAnalytics(isSingleHost);
const resetForm = () => {
+ // @ts-expect-error: FIXME. This comment was added by an automated script.
setHostStatus(null);
setNotesValue("");
};
diff --git a/apps/spruce/src/components/Icon/Icon.stories.tsx b/apps/spruce/src/components/Icon/Icon.stories.tsx
index b541e637b..462b9e8a1 100644
--- a/apps/spruce/src/components/Icon/Icon.stories.tsx
+++ b/apps/spruce/src/components/Icon/Icon.stories.tsx
@@ -20,6 +20,7 @@ export const Icons: CustomStoryObj = {
{Object.keys(glyphs).map((name) => (
+ {/* @ts-expect-error: FIXME. This comment was added by an automated script. */}
{name}
diff --git a/apps/spruce/src/components/Icon/icons/index.tsx b/apps/spruce/src/components/Icon/icons/index.tsx
index cfeded92e..975d89e81 100644
--- a/apps/spruce/src/components/Icon/icons/index.tsx
+++ b/apps/spruce/src/components/Icon/icons/index.tsx
@@ -140,6 +140,7 @@ export const SystemFailure: React.ComponentType = ({
);
+// @ts-expect-error: FIXME. This comment was added by an automated script.
export const TimedOut = ({ className, fill, size = 16 }) => (