feat(mobile): keep Tasks and new-workspace drafts across kills

Task comments (per item and project row), the New issue title and body,
and the New workspace note now live in device-store draft rows. They come
back after the form closes or the app is killed, and only into an empty
field. A comment's setter stays bound to its item, so a send that settles
after the user moved on clears the right row.
This commit is contained in:
Kelvin Amoaba
2026-11-09 03:08:59 +00:00
parent 353f4c5e28
commit b66dc06c78
30 changed files with 2570 additions and 2241 deletions
@@ -97,11 +97,6 @@
"targetKey": "repo-1\u0000owner/repo\u0000issue\u00009"
}
},
"1fc52836dac4": {
"name": "itemReviewersDraft",
"ordinal": 9,
"value": "octocat"
},
"21d560a20bed": {
"name": "error",
"ordinal": 14,
@@ -300,11 +295,6 @@
"ordinal": 3,
"value": ""
},
"56a29701de21": {
"name": "itemCommentDraft",
"ordinal": 8,
"value": "a comment"
},
"5737a7806a0c": {
"name": "mutatingStatus",
"ordinal": 15,
@@ -562,6 +552,11 @@
"targetKey": "repo-1\u0000owner/repo\u0000issue\u00009"
}
},
"9331fbfa07e4": {
"name": "itemCommentDraft",
"ordinal": 9,
"value": "a comment"
},
"948fc1352362": {
"name": "github.addIssueComment#1",
"ordinal": 11,
@@ -741,6 +736,11 @@
"targetKey": "repo-1\u0000owner/repo\u0000issue\u00009"
}
},
"ac15f5699a77": {
"name": "itemReviewersDraft",
"ordinal": 8,
"value": "octocat"
},
"ae745d4c2372": {
"name": "detailPayload",
"ordinal": 14,
@@ -1394,8 +1394,8 @@
"4031bf455f49",
"c43ab05aed16",
"1ca30ac68b76",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"ae745d4c2372",
@@ -1422,8 +1422,8 @@
"4031bf455f49",
"c43ab05aed16",
"1ca30ac68b76",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"ffd879a2e2be",
@@ -1449,8 +1449,8 @@
"4031bf455f49",
"c43ab05aed16",
"1ca30ac68b76",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"ffd879a2e2be",
@@ -1476,8 +1476,8 @@
"4031bf455f49",
"c43ab05aed16",
"1ca30ac68b76",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"fa158073af7f",
@@ -1504,8 +1504,8 @@
"4031bf455f49",
"c43ab05aed16",
"1ca30ac68b76",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"21d560a20bed",
@@ -1531,8 +1531,8 @@
"4031bf455f49",
"c43ab05aed16",
"1ca30ac68b76",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"cc399e1bb52f",
@@ -1559,8 +1559,8 @@
"4031bf455f49",
"c43ab05aed16",
"1ca30ac68b76",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"cb543ce964ae",
@@ -1586,8 +1586,8 @@
"4031bf455f49",
"c43ab05aed16",
"1ca30ac68b76",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"ef8932b03a8c",
@@ -1613,8 +1613,8 @@
"4031bf455f49",
"c43ab05aed16",
"1ca30ac68b76",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"36782b753721",
@@ -1640,8 +1640,8 @@
"4031bf455f49",
"c43ab05aed16",
"1ca30ac68b76",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"f65e0af02b52",
@@ -1667,8 +1667,8 @@
"4031bf455f49",
"c43ab05aed16",
"1ca30ac68b76",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"ef8932b03a8c",
@@ -107,11 +107,6 @@
"provider": "gitlab"
}
},
"1fc52836dac4": {
"name": "itemReviewersDraft",
"ordinal": 9,
"value": "octocat"
},
"21d560a20bed": {
"name": "error",
"ordinal": 14,
@@ -313,11 +308,6 @@
"ordinal": 3,
"value": ""
},
"56a29701de21": {
"name": "itemCommentDraft",
"ordinal": 8,
"value": "a comment"
},
"5737a7806a0c": {
"name": "mutatingStatus",
"ordinal": 15,
@@ -414,6 +404,11 @@
"provider": "gitlab"
}
},
"9331fbfa07e4": {
"name": "itemCommentDraft",
"ordinal": 9,
"value": "a comment"
},
"9932bdaf3500": {
"draft": "a comment",
"error": "The host sent a reply this app could not read (gitlab.addIssueComment)",
@@ -529,6 +524,11 @@
}
}
},
"ac15f5699a77": {
"name": "itemReviewersDraft",
"ordinal": 8,
"value": "octocat"
},
"ad33e328b827": {
"name": "gitlab.addIssueComment#1",
"ordinal": 13,
@@ -1020,8 +1020,8 @@
"4031bf455f49",
"779d1b9a2edb",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"02b5df9521e8",
@@ -1048,8 +1048,8 @@
"4031bf455f49",
"779d1b9a2edb",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"d0afe3374825",
@@ -1075,8 +1075,8 @@
"4031bf455f49",
"779d1b9a2edb",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"d0afe3374825",
@@ -1102,8 +1102,8 @@
"4031bf455f49",
"779d1b9a2edb",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"8a21f81d9fc4",
@@ -1130,8 +1130,8 @@
"4031bf455f49",
"779d1b9a2edb",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"21d560a20bed",
@@ -1157,8 +1157,8 @@
"4031bf455f49",
"779d1b9a2edb",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"d986773c38a9",
@@ -1185,8 +1185,8 @@
"4031bf455f49",
"779d1b9a2edb",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"cb543ce964ae",
@@ -1212,8 +1212,8 @@
"4031bf455f49",
"779d1b9a2edb",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"ef8932b03a8c",
@@ -1239,8 +1239,8 @@
"4031bf455f49",
"779d1b9a2edb",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"36782b753721",
@@ -1266,8 +1266,8 @@
"4031bf455f49",
"779d1b9a2edb",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"f65e0af02b52",
@@ -1293,8 +1293,8 @@
"4031bf455f49",
"779d1b9a2edb",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"ef8932b03a8c",
@@ -51,11 +51,6 @@
"provider": "gitlab"
}
},
"1fc52836dac4": {
"name": "itemReviewersDraft",
"ordinal": 9,
"value": "octocat"
},
"21d560a20bed": {
"name": "error",
"ordinal": 14,
@@ -146,11 +141,6 @@
"ordinal": 3,
"value": ""
},
"56a29701de21": {
"name": "itemCommentDraft",
"ordinal": 8,
"value": "a comment"
},
"5737a7806a0c": {
"name": "mutatingStatus",
"ordinal": 15,
@@ -406,6 +396,11 @@
}
}
},
"9331fbfa07e4": {
"name": "itemCommentDraft",
"ordinal": 9,
"value": "a comment"
},
"965bf7fe4cd8": {
"draft": "a comment",
"error": "Unknown method",
@@ -523,6 +518,11 @@
}
}
},
"ac15f5699a77": {
"name": "itemReviewersDraft",
"ordinal": 8,
"value": "octocat"
},
"b6c88ff35429": {
"draft": "a comment",
"error": "inner refused",
@@ -1020,8 +1020,8 @@
"4031bf455f49",
"622bbddf4f05",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"f3cb1a7df6dc",
@@ -1048,8 +1048,8 @@
"4031bf455f49",
"622bbddf4f05",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"1e866e52fed3",
@@ -1075,8 +1075,8 @@
"4031bf455f49",
"622bbddf4f05",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"1e866e52fed3",
@@ -1102,8 +1102,8 @@
"4031bf455f49",
"622bbddf4f05",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"8a21f81d9fc4",
@@ -1130,8 +1130,8 @@
"4031bf455f49",
"622bbddf4f05",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"21d560a20bed",
@@ -1157,8 +1157,8 @@
"4031bf455f49",
"622bbddf4f05",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"de7b906df67a",
@@ -1185,8 +1185,8 @@
"4031bf455f49",
"622bbddf4f05",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"cb543ce964ae",
@@ -1212,8 +1212,8 @@
"4031bf455f49",
"622bbddf4f05",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"ef8932b03a8c",
@@ -1239,8 +1239,8 @@
"4031bf455f49",
"622bbddf4f05",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"36782b753721",
@@ -1266,8 +1266,8 @@
"4031bf455f49",
"622bbddf4f05",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"f65e0af02b52",
@@ -1293,8 +1293,8 @@
"4031bf455f49",
"622bbddf4f05",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"ef8932b03a8c",
@@ -276,11 +276,6 @@
"title": "A pull request"
}
},
"1fc52836dac4": {
"name": "itemReviewersDraft",
"ordinal": 9,
"value": "octocat"
},
"22b1e4293201": {
"name": "mutatingStatus",
"ordinal": 28,
@@ -628,11 +623,6 @@
"ordinal": 3,
"value": ""
},
"56a29701de21": {
"name": "itemCommentDraft",
"ordinal": 8,
"value": "a comment"
},
"593c53b594c5": {
"draft": "a comment",
"error": "",
@@ -1138,6 +1128,11 @@
"ordinal": 12,
"value": true
},
"9331fbfa07e4": {
"name": "itemCommentDraft",
"ordinal": 9,
"value": "a comment"
},
"94caa29bceef": {
"name": "error",
"ordinal": 19,
@@ -1153,6 +1148,11 @@
"ordinal": 25,
"value": "The host sent a reply this app could not read (github.prChecks)"
},
"ac15f5699a77": {
"name": "itemReviewersDraft",
"ordinal": 8,
"value": "octocat"
},
"acff45feb249": {
"name": "mutatingStatus",
"ordinal": 26,
@@ -1663,8 +1663,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1694,8 +1694,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1731,8 +1731,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1766,8 +1766,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1801,8 +1801,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1836,8 +1836,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1871,8 +1871,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1906,8 +1906,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1941,8 +1941,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1976,8 +1976,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -2011,8 +2011,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -2046,8 +2046,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -268,11 +268,6 @@
"title": "A pull request"
}
},
"1fc52836dac4": {
"name": "itemReviewersDraft",
"ordinal": 9,
"value": "octocat"
},
"21d560a20bed": {
"name": "error",
"ordinal": 14,
@@ -580,11 +575,6 @@
"ordinal": 3,
"value": ""
},
"56a29701de21": {
"name": "itemCommentDraft",
"ordinal": 8,
"value": "a comment"
},
"5737a7806a0c": {
"name": "mutatingStatus",
"ordinal": 15,
@@ -1288,6 +1278,11 @@
}
}
},
"9331fbfa07e4": {
"name": "itemCommentDraft",
"ordinal": 9,
"value": "a comment"
},
"949da9fa9fb2": {
"name": "github.requestPRReviewers#1",
"ordinal": 11,
@@ -1632,6 +1627,11 @@
"targetKey": "repo-1\u0000owner/repo\u0000pr\u000012"
}
},
"ac15f5699a77": {
"name": "itemReviewersDraft",
"ordinal": 8,
"value": "octocat"
},
"acff45feb249": {
"name": "mutatingStatus",
"ordinal": 26,
@@ -2384,8 +2384,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -2415,8 +2415,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -2451,8 +2451,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"407af7575a68",
@@ -2479,8 +2479,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"407af7575a68",
@@ -2512,8 +2512,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"407af7575a68",
@@ -2540,8 +2540,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"407af7575a68",
@@ -2573,8 +2573,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -2604,8 +2604,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -2640,8 +2640,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"21d560a20bed",
@@ -2668,8 +2668,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"21d560a20bed",
@@ -2701,8 +2701,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"124bef35e9e5",
@@ -2730,8 +2730,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"124bef35e9e5",
@@ -2764,8 +2764,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"cb543ce964ae",
@@ -2792,8 +2792,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"cb543ce964ae",
@@ -2825,8 +2825,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"ef8932b03a8c",
@@ -2853,8 +2853,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"ef8932b03a8c",
@@ -2886,8 +2886,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"36782b753721",
@@ -2914,8 +2914,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"36782b753721",
@@ -2947,8 +2947,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"f65e0af02b52",
@@ -2975,8 +2975,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"f65e0af02b52",
@@ -3008,8 +3008,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"ef8932b03a8c",
@@ -3036,8 +3036,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"ef8932b03a8c",
@@ -244,11 +244,6 @@
}
}
},
"1fc52836dac4": {
"name": "itemReviewersDraft",
"ordinal": 9,
"value": "octocat"
},
"22b1e4293201": {
"name": "mutatingStatus",
"ordinal": 28,
@@ -454,11 +449,6 @@
"ordinal": 3,
"value": ""
},
"56a29701de21": {
"name": "itemCommentDraft",
"ordinal": 8,
"value": "a comment"
},
"593c53b594c5": {
"draft": "a comment",
"error": "",
@@ -798,6 +788,11 @@
"ordinal": 12,
"value": true
},
"9331fbfa07e4": {
"name": "itemCommentDraft",
"ordinal": 9,
"value": "a comment"
},
"94caa29bceef": {
"name": "error",
"ordinal": 19,
@@ -841,6 +836,11 @@
"ordinal": 18,
"value": false
},
"ac15f5699a77": {
"name": "itemReviewersDraft",
"ordinal": 8,
"value": "octocat"
},
"ace73bafef56": {
"name": "status.get#1",
"ordinal": 20,
@@ -1187,8 +1187,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1218,8 +1218,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1255,8 +1255,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1292,8 +1292,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1329,8 +1329,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1366,8 +1366,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1403,8 +1403,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1440,8 +1440,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1477,8 +1477,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1514,8 +1514,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1551,8 +1551,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -1588,8 +1588,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -383,39 +383,20 @@
"provider": "linear"
}
},
"22b1e4293201": {
"name": "mutatingStatus",
"ordinal": 28,
"value": false
},
"29cadc65bcbb": {
"name": "error",
"ordinal": 15,
"value": ""
},
"2ea9c99d4796": {
"name": "detailPayload",
"ordinal": 25,
"value": {
"assignee": {
"$rpc": "undefined"
},
"children": [
{
"id": "issue-3",
"identifier": "ENG-3",
"title": "A sub-issue",
"url": ""
}
],
"comments": [],
"description": "description",
"labels": [],
"project": {
"$rpc": "null"
},
"provider": "linear"
}
},
"31dce0186d15": {
"name": "mutatingStatus",
"29ed7524dd3c": {
"name": "error",
"ordinal": 22,
"value": true
"value": ""
},
"335cdd96334f": {
"error": "",
@@ -588,11 +569,6 @@
"provider": "linear"
}
},
"3f80db506009": {
"name": "linearSubIssueTitle",
"ordinal": 24,
"value": ""
},
"3fcdcfa261ee": {
"name": "mutatingStatus",
"ordinal": 23,
@@ -645,11 +621,6 @@
"provider": "linear"
}
},
"427b7993fe85": {
"name": "error",
"ordinal": 20,
"value": ""
},
"44efd00fa69f": {
"name": "linearCommentDraft",
"ordinal": 7,
@@ -798,6 +769,11 @@
}
}
},
"5348c8d60b38": {
"name": "linearCommentDraft",
"ordinal": 20,
"value": ""
},
"57207b51913e": {
"name": "error",
"ordinal": 12,
@@ -876,49 +852,10 @@
"provider": "linear"
}
},
"65b434738c91": {
"name": "linear.createIssue#1",
"ordinal": 21,
"args": [
{
"name": "method",
"value": "linear.createIssue"
},
{
"name": "params",
"value": {
"parentIssueId": "issue-1",
"projectId": {
"$rpc": "null"
},
"teamId": "team-1",
"title": "A sub-issue",
"workspaceId": "linear-workspace"
}
},
{
"name": "options",
"value": {
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-3",
"ok": true,
"result": {
"id": "issue-3",
"identifier": "ENG-3",
"ok": true,
"title": "A sub-issue",
"url": ""
}
}
}
"68003f9dae22": {
"name": "mutatingStatus",
"ordinal": 24,
"value": true
},
"760659bea59b": {
"name": "linear.addIssueComment#1",
@@ -1074,11 +1011,6 @@
"ordinal": 12,
"value": "outer refused"
},
"8167ff6bda4e": {
"name": "linear.createIssue#1",
"ordinal": 23,
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"linear.createIssue\",\"params\":{\"teamId\":\"team-1\",\"title\":\"A sub-issue\",\"workspaceId\":\"linear-workspace\",\"parentIssueId\":\"issue-1\",\"projectId\":null}}"
},
"8427fd4151f1": {
"name": "mutatingStatus",
"ordinal": 14,
@@ -1227,6 +1159,11 @@
"ordinal": 12,
"value": "inner refused"
},
"9911a44bcc07": {
"name": "linearCommentDraft",
"ordinal": 21,
"value": ""
},
"99b079cb804c": {
"name": "linear.addIssueComment#1",
"ordinal": 9,
@@ -1317,16 +1254,35 @@
}
}
},
"9c6909125d76": {
"name": "detailPayload",
"ordinal": 27,
"value": {
"assignee": {
"$rpc": "undefined"
},
"children": [
{
"id": "issue-3",
"identifier": "ENG-3",
"title": "A sub-issue",
"url": ""
}
],
"comments": [],
"description": "description",
"labels": [],
"project": {
"$rpc": "null"
},
"provider": "linear"
}
},
"9dc1f136772e": {
"name": "linearCommentDraft",
"ordinal": 4,
"value": ""
},
"acff45feb249": {
"name": "mutatingStatus",
"ordinal": 26,
"value": false
},
"b1f0308d3795": {
"name": "actionItem",
"ordinal": 5,
@@ -1366,6 +1322,11 @@
"ordinal": 13,
"value": "Failed to add comment"
},
"b2da94d284a1": {
"name": "linearSubIssueTitle",
"ordinal": 26,
"value": ""
},
"b71922b936d3": {
"name": "linear.addIssueComment#1",
"ordinal": 9,
@@ -1516,6 +1477,50 @@
"updatedAt": "2020-01-01T00:00:00.000Z"
}
},
"c4bd3e068c64": {
"name": "linear.createIssue#1",
"ordinal": 23,
"args": [
{
"name": "method",
"value": "linear.createIssue"
},
{
"name": "params",
"value": {
"parentIssueId": "issue-1",
"projectId": {
"$rpc": "null"
},
"teamId": "team-1",
"title": "A sub-issue",
"workspaceId": "linear-workspace"
}
},
{
"name": "options",
"value": {
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-3",
"ok": true,
"result": {
"id": "issue-3",
"identifier": "ENG-3",
"ok": true,
"title": "A sub-issue",
"url": ""
}
}
}
},
"c99df17a93d5": {
"name": "linear.addIssueComment#1",
"ordinal": 9,
@@ -1728,6 +1733,11 @@
"ordinal": 13,
"value": false
},
"e72b7c40f270": {
"name": "linear.createIssue#1",
"ordinal": 25,
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"linear.createIssue\",\"params\":{\"teamId\":\"team-1\",\"title\":\"A sub-issue\",\"workspaceId\":\"linear-workspace\",\"parentIssueId\":\"issue-1\",\"projectId\":null}}"
},
"eb79a9b3682a": {
"status": "fulfilled",
"startedAt": 0,
@@ -2014,15 +2024,16 @@
"ef8932b03a8c",
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4"
"bbf2458754b4",
"5348c8d60b38"
]
}
},
{
"id": "tk-linear-item.result-absent:sub-issue-create-settled",
"observation": {
"sender": ["b71922b936d3", "1fa11661cd73", "65b434738c91"],
"payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"],
"sender": ["b71922b936d3", "1fa11661cd73", "039c2b59e061"],
"payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"],
"settlements": {
"mount": "eb79a9b3682a",
"comment-0": "eb79a9b3682a",
@@ -2046,11 +2057,12 @@
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4",
"427b7993fe85",
"31dce0186d15",
"3f80db506009",
"2ea9c99d4796",
"acff45feb249"
"5348c8d60b38",
"029bb83f402f",
"3fcdcfa261ee",
"7b614cf87045",
"1b7a093f724f",
"fa2f2de4dfe7"
]
}
},
@@ -2105,15 +2117,16 @@
"ef8932b03a8c",
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4"
"bbf2458754b4",
"5348c8d60b38"
]
}
},
{
"id": "tk-linear-item.result-null:sub-issue-create-settled",
"observation": {
"sender": ["99b079cb804c", "1fa11661cd73", "65b434738c91"],
"payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"],
"sender": ["99b079cb804c", "1fa11661cd73", "039c2b59e061"],
"payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"],
"settlements": {
"mount": "eb79a9b3682a",
"comment-0": "eb79a9b3682a",
@@ -2137,11 +2150,12 @@
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4",
"427b7993fe85",
"31dce0186d15",
"3f80db506009",
"2ea9c99d4796",
"acff45feb249"
"5348c8d60b38",
"029bb83f402f",
"3fcdcfa261ee",
"7b614cf87045",
"1b7a093f724f",
"fa2f2de4dfe7"
]
}
},
@@ -2290,15 +2304,16 @@
"ef8932b03a8c",
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4"
"bbf2458754b4",
"5348c8d60b38"
]
}
},
{
"id": "tk-linear-item.inner-false-string-error:sub-issue-create-settled",
"observation": {
"sender": ["8f6bc911a494", "1fa11661cd73", "65b434738c91"],
"payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"],
"sender": ["8f6bc911a494", "1fa11661cd73", "039c2b59e061"],
"payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"],
"settlements": {
"mount": "eb79a9b3682a",
"comment-0": "eb79a9b3682a",
@@ -2322,11 +2337,12 @@
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4",
"427b7993fe85",
"31dce0186d15",
"3f80db506009",
"2ea9c99d4796",
"acff45feb249"
"5348c8d60b38",
"029bb83f402f",
"3fcdcfa261ee",
"7b614cf87045",
"1b7a093f724f",
"fa2f2de4dfe7"
]
}
},
@@ -2383,15 +2399,16 @@
"29cadc65bcbb",
"4dd9211bea32",
"3b3ee1b48010",
"3accbb2a4fcb"
"3accbb2a4fcb",
"9911a44bcc07"
]
}
},
{
"id": "tk-linear-item.inner-false-object-error:sub-issue-create-settled",
"observation": {
"sender": ["8786f555ebcb", "9c2ca99506b2", "039c2b59e061"],
"payloads": ["760659bea59b", "8e34e506a7f8", "88dbfd66d809"],
"sender": ["8786f555ebcb", "9c2ca99506b2", "c4bd3e068c64"],
"payloads": ["760659bea59b", "8e34e506a7f8", "e72b7c40f270"],
"settlements": {
"mount": "eb79a9b3682a",
"comment-0": "eb79a9b3682a",
@@ -2416,11 +2433,12 @@
"4dd9211bea32",
"3b3ee1b48010",
"3accbb2a4fcb",
"029bb83f402f",
"3fcdcfa261ee",
"7b614cf87045",
"1b7a093f724f",
"fa2f2de4dfe7"
"9911a44bcc07",
"29ed7524dd3c",
"68003f9dae22",
"b2da94d284a1",
"9c6909125d76",
"22b1e4293201"
]
}
},
@@ -2475,15 +2493,16 @@
"ef8932b03a8c",
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4"
"bbf2458754b4",
"5348c8d60b38"
]
}
},
{
"id": "tk-linear-item.outer-refused:sub-issue-create-settled",
"observation": {
"sender": ["d970b2195d6d", "1fa11661cd73", "65b434738c91"],
"payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"],
"sender": ["d970b2195d6d", "1fa11661cd73", "039c2b59e061"],
"payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"],
"settlements": {
"mount": "eb79a9b3682a",
"comment-0": "eb79a9b3682a",
@@ -2507,11 +2526,12 @@
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4",
"427b7993fe85",
"31dce0186d15",
"3f80db506009",
"2ea9c99d4796",
"acff45feb249"
"5348c8d60b38",
"029bb83f402f",
"3fcdcfa261ee",
"7b614cf87045",
"1b7a093f724f",
"fa2f2de4dfe7"
]
}
},
@@ -2566,15 +2586,16 @@
"ef8932b03a8c",
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4"
"bbf2458754b4",
"5348c8d60b38"
]
}
},
{
"id": "tk-linear-item.outer-refused-no-message:sub-issue-create-settled",
"observation": {
"sender": ["167c8724b16b", "1fa11661cd73", "65b434738c91"],
"payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"],
"sender": ["167c8724b16b", "1fa11661cd73", "039c2b59e061"],
"payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"],
"settlements": {
"mount": "eb79a9b3682a",
"comment-0": "eb79a9b3682a",
@@ -2598,11 +2619,12 @@
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4",
"427b7993fe85",
"31dce0186d15",
"3f80db506009",
"2ea9c99d4796",
"acff45feb249"
"5348c8d60b38",
"029bb83f402f",
"3fcdcfa261ee",
"7b614cf87045",
"1b7a093f724f",
"fa2f2de4dfe7"
]
}
},
@@ -2657,15 +2679,16 @@
"ef8932b03a8c",
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4"
"bbf2458754b4",
"5348c8d60b38"
]
}
},
{
"id": "tk-linear-item.method-not-found:sub-issue-create-settled",
"observation": {
"sender": ["5037193eac5c", "1fa11661cd73", "65b434738c91"],
"payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"],
"sender": ["5037193eac5c", "1fa11661cd73", "039c2b59e061"],
"payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"],
"settlements": {
"mount": "eb79a9b3682a",
"comment-0": "eb79a9b3682a",
@@ -2689,11 +2712,12 @@
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4",
"427b7993fe85",
"31dce0186d15",
"3f80db506009",
"2ea9c99d4796",
"acff45feb249"
"5348c8d60b38",
"029bb83f402f",
"3fcdcfa261ee",
"7b614cf87045",
"1b7a093f724f",
"fa2f2de4dfe7"
]
}
},
@@ -2748,15 +2772,16 @@
"ef8932b03a8c",
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4"
"bbf2458754b4",
"5348c8d60b38"
]
}
},
{
"id": "tk-linear-item.transport-rejection:sub-issue-create-settled",
"observation": {
"sender": ["cad9f764ce58", "1fa11661cd73", "65b434738c91"],
"payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"],
"sender": ["cad9f764ce58", "1fa11661cd73", "039c2b59e061"],
"payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"],
"settlements": {
"mount": "eb79a9b3682a",
"comment-0": "eb79a9b3682a",
@@ -2780,11 +2805,12 @@
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4",
"427b7993fe85",
"31dce0186d15",
"3f80db506009",
"2ea9c99d4796",
"acff45feb249"
"5348c8d60b38",
"029bb83f402f",
"3fcdcfa261ee",
"7b614cf87045",
"1b7a093f724f",
"fa2f2de4dfe7"
]
}
},
@@ -2839,15 +2865,16 @@
"ef8932b03a8c",
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4"
"bbf2458754b4",
"5348c8d60b38"
]
}
},
{
"id": "tk-linear-item.transport-rejection-no-message:sub-issue-create-settled",
"observation": {
"sender": ["0534215ae768", "1fa11661cd73", "65b434738c91"],
"payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"],
"sender": ["0534215ae768", "1fa11661cd73", "039c2b59e061"],
"payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"],
"settlements": {
"mount": "eb79a9b3682a",
"comment-0": "eb79a9b3682a",
@@ -2871,11 +2898,12 @@
"8ebaf0949b6d",
"c39516152855",
"bbf2458754b4",
"427b7993fe85",
"31dce0186d15",
"3f80db506009",
"2ea9c99d4796",
"acff45feb249"
"5348c8d60b38",
"029bb83f402f",
"3fcdcfa261ee",
"7b614cf87045",
"1b7a093f724f",
"fa2f2de4dfe7"
]
}
}
File diff suppressed because it is too large Load Diff
@@ -54,11 +54,6 @@
"targetKey": "repo-1\u0000owner/repo\u0000issue\u00009"
}
},
"1fc52836dac4": {
"name": "itemReviewersDraft",
"ordinal": 9,
"value": "octocat"
},
"3aefb3006914": {
"name": "error",
"ordinal": 10,
@@ -74,11 +69,6 @@
"ordinal": 3,
"value": ""
},
"56a29701de21": {
"name": "itemCommentDraft",
"ordinal": 8,
"value": "a comment"
},
"69e396c2097f": {
"name": "github.addIssueComment#1",
"ordinal": 13,
@@ -94,6 +84,16 @@
"ordinal": 12,
"value": true
},
"9331fbfa07e4": {
"name": "itemCommentDraft",
"ordinal": 9,
"value": "a comment"
},
"ac15f5699a77": {
"name": "itemReviewersDraft",
"ordinal": 8,
"value": "octocat"
},
"ae745d4c2372": {
"name": "detailPayload",
"ordinal": 14,
@@ -341,8 +341,8 @@
"4031bf455f49",
"c43ab05aed16",
"1ca30ac68b76",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"ae745d4c2372",
@@ -4,11 +4,6 @@
"family": "tasks.item-comment-gitlab-mr",
"namedDeltas": [],
"values": {
"1fc52836dac4": {
"name": "itemReviewersDraft",
"ordinal": 9,
"value": "octocat"
},
"3aefb3006914": {
"name": "error",
"ordinal": 10,
@@ -48,11 +43,6 @@
"ordinal": 3,
"value": ""
},
"56a29701de21": {
"name": "itemCommentDraft",
"ordinal": 8,
"value": "a comment"
},
"622bbddf4f05": {
"name": "actionItem",
"ordinal": 6,
@@ -129,6 +119,16 @@
"ordinal": 12,
"value": true
},
"9331fbfa07e4": {
"name": "itemCommentDraft",
"ordinal": 9,
"value": "a comment"
},
"ac15f5699a77": {
"name": "itemReviewersDraft",
"ordinal": 8,
"value": "octocat"
},
"c650cf641414": {
"name": "itemReviewersDraft",
"ordinal": 4,
@@ -250,8 +250,8 @@
"4031bf455f49",
"622bbddf4f05",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"f3cb1a7df6dc",
@@ -71,11 +71,6 @@
"provider": "gitlab"
}
},
"1fc52836dac4": {
"name": "itemReviewersDraft",
"ordinal": 9,
"value": "octocat"
},
"3aefb3006914": {
"name": "error",
"ordinal": 10,
@@ -110,11 +105,6 @@
"ordinal": 3,
"value": ""
},
"56a29701de21": {
"name": "itemCommentDraft",
"ordinal": 8,
"value": "a comment"
},
"6f50ec77f02f": {
"name": "itemCommentDraft",
"ordinal": 15,
@@ -145,6 +135,16 @@
"ordinal": 12,
"value": true
},
"9331fbfa07e4": {
"name": "itemCommentDraft",
"ordinal": 9,
"value": "a comment"
},
"ac15f5699a77": {
"name": "itemReviewersDraft",
"ordinal": 8,
"value": "octocat"
},
"ad33e328b827": {
"name": "gitlab.addIssueComment#1",
"ordinal": 13,
@@ -250,8 +250,8 @@
"4031bf455f49",
"779d1b9a2edb",
"474412c229f4",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"02b5df9521e8",
@@ -136,11 +136,6 @@
"title": "A pull request"
}
},
"1fc52836dac4": {
"name": "itemReviewersDraft",
"ordinal": 9,
"value": "octocat"
},
"22b1e4293201": {
"name": "mutatingStatus",
"ordinal": 28,
@@ -310,11 +305,6 @@
"ordinal": 3,
"value": ""
},
"56a29701de21": {
"name": "itemCommentDraft",
"ordinal": 8,
"value": "a comment"
},
"593c53b594c5": {
"draft": "a comment",
"error": "",
@@ -581,6 +571,11 @@
"ordinal": 12,
"value": true
},
"9331fbfa07e4": {
"name": "itemCommentDraft",
"ordinal": 9,
"value": "a comment"
},
"94caa29bceef": {
"name": "error",
"ordinal": 19,
@@ -591,6 +586,11 @@
"ordinal": 18,
"value": false
},
"ac15f5699a77": {
"name": "itemReviewersDraft",
"ordinal": 8,
"value": "octocat"
},
"baa2764f836f": {
"name": "github.prChecks#1",
"ordinal": 24,
@@ -827,8 +827,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -858,8 +858,8 @@
"4031bf455f49",
"04f768fb79f6",
"26f442c9e2e5",
"56a29701de21",
"1fc52836dac4",
"ac15f5699a77",
"9331fbfa07e4",
"3aefb3006914",
"886c60a7e62e",
"c29314fc4896",
@@ -4,10 +4,10 @@
"family": "tasks.linear-team-context",
"namedDeltas": [],
"values": {
"1288b8513745": {
"name": "linearStatesError",
"ordinal": 13,
"value": ""
"031c50459130": {
"name": "createTeamId",
"ordinal": 10,
"value": "team-1"
},
"2afc4b1311c1": {
"createTeamId": "team-1",
@@ -22,24 +22,9 @@
}
]
},
"33218d06f656": {
"name": "linearStates",
"ordinal": 6,
"value": []
},
"356f2cb9a0df": {
"name": "linearStatesLoading",
"ordinal": 17,
"value": false
},
"3abc893d377b": {
"name": "mutatingStatus",
"ordinal": 3,
"value": false
},
"475ec9a66266": {
"38ed617d559f": {
"name": "linearTeams",
"ordinal": 10,
"ordinal": 9,
"value": [
{
"id": "team-1",
@@ -49,9 +34,44 @@
}
]
},
"5711e2717b76": {
"name": "linearStates",
"3abc893d377b": {
"name": "mutatingStatus",
"ordinal": 3,
"value": false
},
"4fcc46dfeb77": {
"name": "linear.listTeams#1",
"ordinal": 8,
"json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"linear.listTeams\"}"
},
"5dcdc7fd7492": {
"name": "linearSubIssueTitle",
"ordinal": 4,
"value": ""
},
"74335ecb4cd2": {
"name": "linearStatesLoading",
"ordinal": 16,
"value": false
},
"74505ce2789a": {
"name": "linearStates",
"ordinal": 5,
"value": []
},
"77a7eff4a3cc": {
"name": "linearStatesLoading",
"ordinal": 11,
"value": true
},
"82b36eab5101": {
"name": "creatingTask",
"ordinal": 6,
"value": false
},
"a14f6c361136": {
"name": "linearStates",
"ordinal": 15,
"value": [
{
"color": "#000000",
@@ -61,24 +81,34 @@
}
]
},
"60a0395d07c7": {
"name": "linearStatesLoading",
"ordinal": 12,
"value": true
},
"610f6c28e7a1": {
"name": "linearSubIssueTitle",
"ordinal": 5,
"value": ""
},
"9131972798ca": {
"name": "linear.teamStates#1",
"ordinal": 15,
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"linear.teamStates\",\"params\":{\"teamId\":\"team-1\",\"workspaceId\":\"linear-workspace\"}}"
},
"95b075d66243": {
"b5ba6f00c4fb": {
"name": "linear.teamStates#1",
"ordinal": 14,
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"linear.teamStates\",\"params\":{\"teamId\":\"team-1\",\"workspaceId\":\"linear-workspace\"}}"
},
"b6bf81e9e237": {
"createTeamId": "team-1",
"states": [
{
"color": "#000000",
"id": "state-1",
"name": "Todo",
"type": "unstarted"
}
],
"statesLoading": false,
"teams": [
{
"id": "team-1",
"key": "ENG",
"name": "Engineering",
"workspaceId": "linear-workspace"
}
]
},
"c88d134e7a42": {
"name": "linear.teamStates#1",
"ordinal": 13,
"args": [
{
"name": "method",
@@ -116,41 +146,6 @@
}
}
},
"9dc1f136772e": {
"name": "linearCommentDraft",
"ordinal": 4,
"value": ""
},
"b164dfd464b3": {
"name": "linear.listTeams#1",
"ordinal": 9,
"json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"linear.listTeams\"}"
},
"b1adae647a3f": {
"name": "createTeamId",
"ordinal": 11,
"value": "team-1"
},
"b6bf81e9e237": {
"createTeamId": "team-1",
"states": [
{
"color": "#000000",
"id": "state-1",
"name": "Todo",
"type": "unstarted"
}
],
"statesLoading": false,
"teams": [
{
"id": "team-1",
"key": "ENG",
"name": "Engineering",
"workspaceId": "linear-workspace"
}
]
},
"cc2ece9478f0": {
"name": "actionItem",
"ordinal": 1,
@@ -158,9 +153,29 @@
"$rpc": "null"
}
},
"ceb71a750e06": {
"db66582f88a9": {
"name": "linearStatesError",
"ordinal": 12,
"value": ""
},
"eb79a9b3682a": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"$rpc": "undefined"
}
},
"eda130337c99": {
"name": "detailPayload",
"ordinal": 2,
"value": {
"$rpc": "null"
}
},
"ee01f277ffc4": {
"name": "linear.listTeams#1",
"ordinal": 8,
"ordinal": 7,
"args": [
{
"name": "method",
@@ -196,26 +211,6 @@
]
}
}
},
"e9a162defc32": {
"name": "creatingTask",
"ordinal": 7,
"value": false
},
"eb79a9b3682a": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"$rpc": "undefined"
}
},
"eda130337c99": {
"name": "detailPayload",
"ordinal": 2,
"value": {
"$rpc": "null"
}
}
},
"recording": {
@@ -224,8 +219,8 @@
{
"id": "open-composer-settled",
"observation": {
"sender": ["ceb71a750e06"],
"payloads": ["b164dfd464b3"],
"sender": ["ee01f277ffc4"],
"payloads": ["4fcc46dfeb77"],
"settlements": {
"mount": "eb79a9b3682a",
"open-composer-0": "eb79a9b3682a"
@@ -235,20 +230,19 @@
"cc2ece9478f0",
"eda130337c99",
"3abc893d377b",
"9dc1f136772e",
"610f6c28e7a1",
"33218d06f656",
"e9a162defc32",
"475ec9a66266",
"b1adae647a3f"
"5dcdc7fd7492",
"74505ce2789a",
"82b36eab5101",
"38ed617d559f",
"031c50459130"
]
}
},
{
"id": "select-metadata-item-settled",
"observation": {
"sender": ["ceb71a750e06", "95b075d66243"],
"payloads": ["b164dfd464b3", "9131972798ca"],
"sender": ["ee01f277ffc4", "c88d134e7a42"],
"payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"],
"settlements": {
"mount": "eb79a9b3682a",
"open-composer-0": "eb79a9b3682a",
@@ -259,16 +253,15 @@
"cc2ece9478f0",
"eda130337c99",
"3abc893d377b",
"9dc1f136772e",
"610f6c28e7a1",
"33218d06f656",
"e9a162defc32",
"475ec9a66266",
"b1adae647a3f",
"60a0395d07c7",
"1288b8513745",
"5711e2717b76",
"356f2cb9a0df"
"5dcdc7fd7492",
"74505ce2789a",
"82b36eab5101",
"38ed617d559f",
"031c50459130",
"77a7eff4a3cc",
"db66582f88a9",
"a14f6c361136",
"74335ecb4cd2"
]
}
}
@@ -4,53 +4,20 @@
"family": "tasks.project-row-detail",
"namedDeltas": [],
"values": {
"0679b27a119b": {
"name": "projectFieldDrafts",
"ordinal": 11,
"value": {}
},
"118d9662d37f": {
"0a6c63ec0fc1": {
"name": "github.project.workItemDetailsBySlug#1",
"ordinal": 16,
"ordinal": 15,
"json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.project.workItemDetailsBySlug\",\"params\":{\"owner\":\"owner\",\"repo\":\"repo\",\"host\":\"github.enterprise.test\",\"number\":1,\"type\":\"issue\"}}"
},
"1e161db29c89": {
"name": "projectRowDetail",
"ordinal": 17,
"value": {
"assignees": [],
"baseSha": "base-sha",
"body": "body",
"checks": [],
"comments": [],
"files": [],
"headSha": "head-sha",
"labels": [],
"latestReviews": [],
"provider": "github",
"pullRequestId": "PR_kwDO",
"reviewDecision": {
"$rpc": "undefined"
},
"reviewRequests": []
}
},
"2ee1c7329449": {
"name": "projectRowDetail",
"ordinal": 12,
"value": {
"$rpc": "null"
}
},
"31fcc93f02da": {
"0d5e8bc85abb": {
"name": "projectEditingCommentDraft",
"ordinal": 9,
"ordinal": 8,
"value": ""
},
"368311fc2981": {
"name": "projectCommentDraft",
"ordinal": 7,
"value": ""
"34aecaef096a": {
"name": "projectRowDetailLoading",
"ordinal": 17,
"value": false
},
"3a42a92c5487": {
"name": "projectBodyDraft",
@@ -64,36 +31,9 @@
"$rpc": "null"
}
},
"4f23116da7f6": {
"name": "projectReviewersDraft",
"ordinal": 10,
"value": ""
},
"561861a537bb": {
"name": "projectRowDetailLoading",
"ordinal": 18,
"value": false
},
"5cebe6c14680": {
"name": "prFileLoadingPath",
"ordinal": 4,
"value": {
"$rpc": "null"
}
},
"60012e7abb60": {
"name": "prFileCommentDrafts",
"ordinal": 2,
"value": {}
},
"7ca2bb47ab1c": {
"name": "prFileContents",
"ordinal": 3,
"value": {}
},
"899221be28d8": {
"55361bf207c6": {
"name": "github.project.workItemDetailsBySlug#1",
"ordinal": 15,
"ordinal": 14,
"args": [
{
"name": "method",
@@ -152,6 +92,40 @@
}
}
},
"5b08d6631c0c": {
"name": "projectRowDetailError",
"ordinal": 12,
"value": ""
},
"5cebe6c14680": {
"name": "prFileLoadingPath",
"ordinal": 4,
"value": {
"$rpc": "null"
}
},
"60012e7abb60": {
"name": "prFileCommentDrafts",
"ordinal": 2,
"value": {}
},
"6a0930bd2fdb": {
"name": "projectEditingCommentId",
"ordinal": 7,
"value": {
"$rpc": "null"
}
},
"7ca2bb47ab1c": {
"name": "prFileContents",
"ordinal": 3,
"value": {}
},
"93c5cbde2045": {
"name": "projectRowDetailLoading",
"ordinal": 13,
"value": true
},
"9911dd53d1d7": {
"name": "projectTitleDraft",
"ordinal": 5,
@@ -178,18 +152,44 @@
"error": "",
"loading": false
},
"b63d5911050c": {
"name": "projectRowDetailError",
"ordinal": 13,
"bf07b693e877": {
"name": "projectRowDetail",
"ordinal": 16,
"value": {
"assignees": [],
"baseSha": "base-sha",
"body": "body",
"checks": [],
"comments": [],
"files": [],
"headSha": "head-sha",
"labels": [],
"latestReviews": [],
"provider": "github",
"pullRequestId": "PR_kwDO",
"reviewDecision": {
"$rpc": "undefined"
},
"reviewRequests": []
}
},
"c82fb4f46067": {
"name": "projectReviewersDraft",
"ordinal": 9,
"value": ""
},
"c0e2c37d8abf": {
"name": "projectEditingCommentId",
"ordinal": 8,
"de8ce98bdd63": {
"name": "projectRowDetail",
"ordinal": 11,
"value": {
"$rpc": "null"
}
},
"e5129a14b6e4": {
"name": "projectFieldDrafts",
"ordinal": 10,
"value": {}
},
"eb79a9b3682a": {
"status": "fulfilled",
"startedAt": 0,
@@ -197,11 +197,6 @@
"value": {
"$rpc": "undefined"
}
},
"f6a5085dd8e9": {
"name": "projectRowDetailLoading",
"ordinal": 14,
"value": true
}
},
"recording": {
@@ -210,8 +205,8 @@
{
"id": "mounted",
"observation": {
"sender": ["899221be28d8"],
"payloads": ["118d9662d37f"],
"sender": ["55361bf207c6"],
"payloads": ["0a6c63ec0fc1"],
"settlements": {
"mount": "eb79a9b3682a"
},
@@ -223,16 +218,15 @@
"5cebe6c14680",
"9911dd53d1d7",
"3a42a92c5487",
"368311fc2981",
"c0e2c37d8abf",
"31fcc93f02da",
"4f23116da7f6",
"0679b27a119b",
"2ee1c7329449",
"b63d5911050c",
"f6a5085dd8e9",
"1e161db29c89",
"561861a537bb"
"6a0930bd2fdb",
"0d5e8bc85abb",
"c82fb4f46067",
"e5129a14b6e4",
"de8ce98bdd63",
"5b08d6631c0c",
"93c5cbde2045",
"bf07b693e877",
"34aecaef096a"
]
}
}
@@ -68,6 +68,9 @@ import '../../../src/shared/execution-host'
import type { ExecutionHostId } from '../../../src/shared/execution-host'
import { NewWorktreeModal } from './NewWorktreeModal'
import { publishPageDeviceStore } from '../mobile-web-shell/bridge/page-device-store'
import { resetDurableDraftFieldsForTests } from '../drafts/durable-draft-fields'
import { publishInMemoryDeviceStore } from '../drafts/in-memory-device-store.test-support'
import { findAllByHostType } from '../test-support/react-test-renderer-host-nodes'
@@ -347,3 +350,73 @@ describe('NewWorktreeModal project targets', () => {
expect(sourceInputs(renderer).map((input) => input.props.value)).toEqual(['', ''])
})
})
describe('NewWorktreeModal note draft', () => {
// The shell's draft table outlives the page; nothing else does.
const table = new Map<string, string>()
let renderer: ReactTestRenderer | null = null
async function open(): Promise<ReactTestRenderer> {
const client = requestsOnly(
vi.fn((method: string) =>
method === 'repo.list' ? replied({ repos }) : new Promise<never>(() => {})
)
)
await act(async () => {
renderer = create(
createElement(NewWorktreeModal, {
visible: true,
client,
hostId: 'host-1',
onCreated: () => {},
onClose: () => {},
openExternalUrl: () => {}
})
)
await vi.advanceTimersByTimeAsync(0)
})
return renderer!
}
const noteInput = (opened: ReactTestRenderer) =>
findAllByHostType(opened.root, 'TextInput').find(
(node) => node.props.placeholder === 'Write a note'
)!
const optionsExpanded = (opened: ReactTestRenderer) =>
opened.root.find((node) => node.props.title === 'Options' && 'expanded' in node.props).props
.expanded
// A kill: the page and its memory go, the store stays.
function kill(): void {
act(() => renderer?.unmount())
renderer = null
resetDurableDraftFieldsForTests()
}
beforeEach(() => {
vi.useFakeTimers()
setCachedRepos('host-1', repos)
resetDurableDraftFieldsForTests()
publishInMemoryDeviceStore(table)
})
afterEach(() => {
kill()
table.clear()
publishPageDeviceStore(null)
vi.useRealTimers()
})
it('brings the note back after a kill, with Options open so it is not sent unseen', async () => {
const typed = await open()
act(() => noteInput(typed).props.onChangeText('pairing with Ama on the flaky test'))
await act(async () => {
await vi.advanceTimersByTimeAsync(1000)
})
kill()
const reopened = await open()
expect(noteInput(reopened).props.value).toBe('pairing with Ama on the flaky test')
expect(optionsExpanded(reopened)).toBe(true)
})
})
+19 -4
View File
@@ -16,6 +16,8 @@ import {
buildRetiredWorktreeNamesRefreshKey,
useRetiredWorktreeNames
} from '../worktree/use-retired-worktree-names'
import { durableDraftRowKey } from '../drafts/durable-draft-rows'
import { useDurableDraftField } from '../drafts/durable-draft-fields'
import { BottomDrawerModalHost } from './bottom-drawer/bottom-drawer-modal-host'
import {
getMobileWorkspaceRepoBadgeColor,
@@ -37,6 +39,9 @@ import { useNewWorkspaceRuntimeContext } from './use-new-workspace-runtime-conte
import { useNewWorkspaceSetupScript } from './use-new-workspace-setup-script'
import { useNewWorktreeDrawerNavigation } from './use-new-worktree-drawer-navigation'
// Host-scoped (`''` worktree part): one New workspace form per paired desktop; the shell binds the host.
const WORKSPACE_CREATE_DRAFT_KEY = durableDraftRowKey('workspaceCreate', '', '')
/** The server a repo runs on; undefined for the desktop's own (local, SSH, folder). */
function serverOf(repo: MobileWorkspaceRepo): `runtime:${string}` | undefined {
const host = parseExecutionHostId(getRepoExecutionHostId(repo))
@@ -82,7 +87,8 @@ function NewWorktreeModalContent(props: NewWorktreeModalProps) {
const repoServer = selectedRepo ? serverOf(selectedRepo) : undefined
const client = repoServer ? (serverClients?.get(repoServer) ?? null) : desktopClient
const navigation = useNewWorktreeDrawerNavigation(visible)
const [note, setNote] = useState('')
// Kept until a create succeeds, so a closed or killed form gets its note back.
const [note, setNote] = useDurableDraftField(WORKSPACE_CREATE_DRAFT_KEY, 'note')
const [error, setError] = useState('')
const runtime = useNewWorkspaceRuntimeContext(client, visible, hostId, repoServer)
const repoRuntime = useNewWorktreeRuntimeCapabilities(client, visible)
@@ -103,6 +109,9 @@ function NewWorktreeModalContent(props: NewWorktreeModalProps) {
visible
})
const setupScript = useNewWorkspaceSetupScript({ client, selectedRepo })
// A kept note holds Options open until the user folds them, so it isn't sent unseen.
const [noteFolded, setNoteFolded] = useState(false)
const showOptions = setupScript.showAdvanced || (note !== '' && !noteFolded)
const selectedRepoWorktreeBranches = useMemo(
() => getComposerRepoWorktreeBranches(existingWorktrees ?? [], selectedRepo?.id ?? null),
[existingWorktrees, selectedRepo]
@@ -161,7 +170,10 @@ function NewWorktreeModalContent(props: NewWorktreeModalProps) {
getAgentLaunchSupport,
transitionDrawer: navigation.transitionDrawer,
setError,
onCreated: (worktreeId, name, warning) => onCreated(worktreeId, name, warning, repoServer),
onCreated: (worktreeId, name, warning) => {
setNote('')
onCreated(worktreeId, name, warning, repoServer)
},
onClose
})
@@ -254,7 +266,7 @@ function NewWorktreeModalContent(props: NewWorktreeModalProps) {
sshGate={executionTarget.sshGate}
composer={composer}
selectedAgent={agentSelection.selectedAgent}
showAdvanced={setupScript.showAdvanced}
showAdvanced={showOptions}
note={note}
setupCommand={setupScript.setupCommand}
setupSource={setupScript.setupSource}
@@ -272,7 +284,10 @@ function NewWorktreeModalContent(props: NewWorktreeModalProps) {
onClearError={() => setError('')}
onConnect={() => void executionTarget.connect()}
onOpenAgent={() => openPicker('agent')}
onShowAdvancedChange={setupScript.setShowAdvanced}
onShowAdvancedChange={(show) => {
setNoteFolded(!show)
setupScript.setShowAdvanced(show)
}}
onNoteChange={setNote}
onSetupDecisionChange={setupScript.setSetupDecisionChoice}
onRunSetupChange={setupScript.setRunSetup}
+116
View File
@@ -0,0 +1,116 @@
import { useCallback, useSyncExternalStore, type SetStateAction } from 'react'
import * as z from 'zod'
import {
durableDraftRow,
pageDraftRowBackend,
resetDurableDraftRowsForTests,
type DurableDraftRow
} from './durable-draft-rows'
// A row's typed text fields; an empty field is left out, and a row with none is removed.
type DraftFields = Readonly<Record<string, string>>
const savedFieldsSchema = z.record(z.string(), z.string())
type Slot = {
fields: DraftFields
listeners: Set<() => void>
row: DurableDraftRow
}
// The page's copy of each row, so a form that closes and reopens shows its text without a read.
const slots = new Map<string, Slot>()
function notify(slot: Slot): void {
for (const listener of slot.listeners) {
listener()
}
}
function slotFor(key: string): Slot {
const existing = slots.get(key)
if (existing) {
return existing
}
const slot: Slot = {
fields: {},
listeners: new Set(),
row: durableDraftRow(key, {
backend: () => pageDraftRowBackend(key),
snapshot: () => (Object.keys(slot.fields).length > 0 ? slot.fields : null),
restore: (saved) => {
const parsed = savedFieldsSchema.safeParse(saved)
if (!parsed.success) {
return
}
// Text typed before the read landed wins over the saved copy.
const restored = Object.fromEntries(Object.entries(parsed.data).filter(([, text]) => text))
slot.fields = { ...restored, ...slot.fields }
notify(slot)
}
})
}
slots.set(key, slot)
return slot
}
/** Sets one field of a row, wherever it is shown; a send that settles after its form closed clears its own row. */
export function updateDurableDraftField(
key: string,
field: string,
update: SetStateAction<string>
): void {
const slot = slotFor(key)
const current = slot.fields[field] ?? ''
const next = typeof update === 'function' ? update(current) : update
if (next === current) {
return
}
const rest = Object.fromEntries(Object.entries(slot.fields).filter(([name]) => name !== field))
slot.fields = next ? { ...rest, [field]: next } : rest
notify(slot)
// An emptied row is written at once, so sent text can't come back.
slot.row.save(Object.keys(slot.fields).length > 0 ? 'deferred' : 'immediate')
}
/**
* One typed field kept in a draft row: it survives the form closing and the page being killed, and
* comes back only into a field still empty. A null key (nothing to type into) holds nothing.
*/
export function useDurableDraftField(
key: string | null,
field: string
): readonly [string, (update: SetStateAction<string>) => void] {
const subscribe = useCallback(
(onChange: () => void) => {
if (!key) {
return () => {}
}
const slot = slotFor(key)
slot.listeners.add(onChange)
// Read once per page; a read the store dropped is retried by the next form that opens the row.
void slot.row.load()
return () => {
slot.listeners.delete(onChange)
}
},
[key]
)
const read = () => (key ? (slots.get(key)?.fields[field] ?? '') : '')
const value = useSyncExternalStore(subscribe, read, read)
// Bound to this key, so a send that settles after the user moved on clears the row it came from.
const setValue = useCallback(
(update: SetStateAction<string>) => {
if (key) {
updateDurableDraftField(key, field, update)
}
},
[field, key]
)
return [value, setValue] as const
}
export function resetDurableDraftFieldsForTests(): void {
slots.clear()
resetDurableDraftRowsForTests()
}
@@ -0,0 +1,22 @@
import { publishPageDeviceStore } from '../mobile-web-shell/bridge/page-device-store'
/** Grants the page a device store backed by `table`, which outlives the page as the shell's would. */
export function publishInMemoryDeviceStore(table: Map<string, string>): void {
publishPageDeviceStore({
available: () => true,
read: async (_table, keys) => ({
status: 'ok',
values: keys.map((key) => table.get(key) ?? null)
}),
write: async (_table, ops) => {
for (const op of ops) {
if (op.value === null) {
table.delete(op.key)
} else {
table.set(op.key, op.value)
}
}
return { written: true }
}
})
}
@@ -2,6 +2,7 @@ import { createElement } from 'react'
import { act, create, type ReactTestRenderer } from 'react-test-renderer'
import { afterEach, beforeEach, expect, it, vi } from 'vitest'
import { publishPageDeviceStore } from '../mobile-web-shell/bridge/page-device-store'
import { publishInMemoryDeviceStore } from './in-memory-device-store.test-support'
import { dropDocumentEditDraft, resetDocumentEditDraftsForTests } from './document-edit-draft-rows'
import { useDocumentEditDraft } from './use-document-edit-draft'
@@ -42,23 +43,7 @@ function kill(): void {
beforeEach(() => {
vi.useFakeTimers()
publishPageDeviceStore({
available: () => true,
read: async (_table, keys) => ({
status: 'ok',
values: keys.map((key) => table.get(key) ?? null)
}),
write: async (_table, ops) => {
for (const op of ops) {
if (op.value === null) {
table.delete(op.key)
} else {
table.set(op.key, op.value)
}
}
return { written: true }
}
})
publishInMemoryDeviceStore(table)
})
afterEach(() => {
+99
View File
@@ -0,0 +1,99 @@
import { createElement } from 'react'
import { act, create, type ReactTestRenderer } from 'react-test-renderer'
import { afterEach, beforeEach, expect, it, vi } from 'vitest'
import { publishPageDeviceStore } from '../mobile-web-shell/bridge/page-device-store'
import { resetDurableDraftFieldsForTests } from '../drafts/durable-draft-fields'
import { publishInMemoryDeviceStore } from '../drafts/in-memory-device-store.test-support'
import { item } from './github-task-identity.test-fixture'
import type { ActionableTaskItem } from './mobile-tasks-project-workspace-types'
import { useTaskCommentDraft, useTaskCreateDraft } from './task-draft-rows'
type Screen = {
comment: ReturnType<typeof useTaskCommentDraft>
create: ReturnType<typeof useTaskCreateDraft>
}
// The shell's draft table outlives the page; nothing else does.
const table = new Map<string, string>()
let renderer: ReactTestRenderer | null = null
let screen: Screen | null = null
function Tasks(props: { item: ActionableTaskItem | null }) {
screen = { comment: useTaskCommentDraft(props.item), create: useTaskCreateDraft() }
return null
}
async function open(selected: ActionableTaskItem | null): Promise<Screen> {
await act(async () => {
if (renderer) {
renderer.update(createElement(Tasks, { item: selected }))
} else {
renderer = create(createElement(Tasks, { item: selected }))
}
await vi.advanceTimersByTimeAsync(0)
})
return screen!
}
async function settle(): Promise<void> {
await act(async () => {
await vi.advanceTimersByTimeAsync(1000)
})
}
// A kill: the page and its memory go, the store stays.
function kill(): void {
act(() => renderer?.unmount())
renderer = null
resetDurableDraftFieldsForTests()
}
beforeEach(() => {
vi.useFakeTimers()
publishInMemoryDeviceStore(table)
})
afterEach(() => {
kill()
table.clear()
publishPageDeviceStore(null)
vi.useRealTimers()
})
it('brings a comment back to the item it was typed on after a kill', async () => {
const typed = await open(item('acme'))
act(() => typed.comment[1]('Looks good, one nit'))
await settle()
kill()
expect((await open(item('other'))).comment[0]).toBe('')
expect((await open(item('acme'))).comment[0]).toBe('Looks good, one nit')
})
it('does not bring back a comment whose send landed after the user moved on', async () => {
const typed = await open(item('acme'))
act(() => typed.comment[1]('Looks good, one nit'))
await settle()
const clearSent = typed.comment[1]
await open(item('other'))
act(() => clearSent((current) => (current.trim() === 'Looks good, one nit' ? '' : current)))
await settle()
kill()
expect((await open(item('acme'))).comment[0]).toBe('')
})
it('brings the New issue title and body back after a kill', async () => {
const typed = await open(null)
act(() => {
typed.create.setCreateTitle('Crash on launch')
typed.create.setCreateBody('Steps: open the app')
})
await settle()
kill()
const reopened = await open(null)
expect(reopened.create.createTitle).toBe('Crash on launch')
expect(reopened.create.createBody).toBe('Steps: open the app')
})
+34
View File
@@ -0,0 +1,34 @@
import { durableDraftRowKey } from '../drafts/durable-draft-rows'
import { useDurableDraftField } from '../drafts/durable-draft-fields'
import { githubTaskKey } from './github-task-identity'
import type { ActionableTaskItem } from './mobile-tasks-project-workspace-types'
import type { GitHubProjectRow } from './mobile-tasks-view-state-types'
/** The item a status edit or refresh hands over as a new object is still the same item. */
export function taskItemIdentity(item: ActionableTaskItem): string {
return item.provider === 'github' ? `github:${githubTaskKey(item.source)}` : item.key
}
// Tasks rows are host-scoped (`''` worktree part); the shell binds the host.
function taskCommentDraftKey(id: string | null): string | null {
return id === null ? null : durableDraftRowKey('taskComment', '', id)
}
const TASK_CREATE_DRAFT_KEY = durableDraftRowKey('taskCreate', '', '')
/** The open item's comment box, kept per item. */
export function useTaskCommentDraft(item: ActionableTaskItem | null) {
return useDurableDraftField(taskCommentDraftKey(item && taskItemIdentity(item)), 'text')
}
/** A GitHub project row's comment box, kept per row. */
export function useProjectRowCommentDraft(row: GitHubProjectRow | null) {
return useDurableDraftField(taskCommentDraftKey(row && `githubProject:${row.id}`), 'text')
}
/** The New issue sheet's title and body, kept until a create succeeds. */
export function useTaskCreateDraft() {
const [createTitle, setCreateTitle] = useDurableDraftField(TASK_CREATE_DRAFT_KEY, 'title')
const [createBody, setCreateBody] = useDurableDraftField(TASK_CREATE_DRAFT_KEY, 'body')
return { createTitle, setCreateTitle, createBody, setCreateBody }
}
@@ -27,7 +27,6 @@ export function useMobileTasksItemState() {
}, [])
const [itemTitleDraft, setItemTitleDraft] = useState('')
const [itemBodyDraft, setItemBodyDraft] = useState('')
const [itemCommentDraft, setItemCommentDraft] = useState('')
const [itemAddLabelsDraft, setItemAddLabelsDraft] = useState('')
const [itemRemoveLabelsDraft, setItemRemoveLabelsDraft] = useState('')
const [itemAddAssigneesDraft, setItemAddAssigneesDraft] = useState('')
@@ -110,8 +109,6 @@ export function useMobileTasksItemState() {
setItemTitleDraft,
itemBodyDraft,
setItemBodyDraft,
itemCommentDraft,
setItemCommentDraft,
itemAddLabelsDraft,
setItemAddLabelsDraft,
itemRemoveLabelsDraft,
@@ -1,4 +1,5 @@
import { githubTaskKey } from './github-task-identity'
import { taskItemIdentity } from './task-draft-rows'
import { translate } from '../i18n/mobile-i18n'
import type { ProjectLoadingActionsModel } from './use-mobile-tasks-project-loading-actions'
import {
@@ -52,7 +53,6 @@ export function useMobileTasksListAndDetailEffects(model: ProjectLoadingActionsM
setError,
setGithubProjectError,
setGithubRepoSlugCache,
setLinearCommentDraft,
setLinearStates,
setLinearStatesError,
setLinearStatesLoading,
@@ -246,7 +246,6 @@ export function useMobileTasksListAndDetailEffects(model: ProjectLoadingActionsM
const linearMetadataKey = linearMetadataItem?.key ?? null
useEffect(() => {
setLinearCommentDraft('')
setLinearSubIssueTitle('')
}, [linearMetadataKey])
@@ -315,7 +314,6 @@ export function useMobileTasksItemSelectionEffects(
| 'setItemAddAssigneesDraft'
| 'setItemAddLabelsDraft'
| 'setItemBodyDraft'
| 'setItemCommentDraft'
| 'setItemRemoveAssigneesDraft'
| 'setItemRemoveLabelsDraft'
| 'setItemReplyDrafts'
@@ -333,7 +331,6 @@ export function useMobileTasksItemSelectionEffects(
setItemAddAssigneesDraft,
setItemAddLabelsDraft,
setItemBodyDraft,
setItemCommentDraft,
setItemRemoveAssigneesDraft,
setItemRemoveLabelsDraft,
setItemReplyDrafts,
@@ -341,8 +338,7 @@ export function useMobileTasksItemSelectionEffects(
setItemTitleDraft,
setPrFileCommentDrafts
} = model
const actionIdentity =
actionItem?.provider === 'github' ? githubTaskKey(actionItem.source) : actionItem?.key
const actionIdentity = actionItem && taskItemIdentity(actionItem)
const fileRevision =
model.detailPayload?.provider === 'github'
@@ -357,10 +353,10 @@ export function useMobileTasksItemSelectionEffects(
}, [actionIdentity, client, fileRevision, resetPrFiles])
// Keyed on identity: status edits, refreshes and reconnects hand over a new object for the same item.
// The comment box is not reset: it is kept per item in its draft row.
useEffect(() => {
setItemTitleDraft(actionItem?.title ?? '')
setItemBodyDraft('')
setItemCommentDraft('')
setItemAddLabelsDraft('')
setItemRemoveLabelsDraft('')
setItemAddAssigneesDraft('')
@@ -20,7 +20,6 @@ export function useMobileTasksProjectDetailLoading<
| 'setPrFileCommentDrafts'
| 'resetPrFiles'
| 'setProjectBodyDraft'
| 'setProjectCommentDraft'
| 'setProjectEditingCommentDraft'
| 'setProjectEditingCommentId'
| 'setProjectFieldDrafts'
@@ -42,7 +41,6 @@ export function useMobileTasksProjectDetailLoading<
setPrFileCommentDrafts,
resetPrFiles,
setProjectBodyDraft,
setProjectCommentDraft,
setProjectEditingCommentDraft,
setProjectEditingCommentId,
setProjectFieldDrafts,
@@ -57,11 +55,11 @@ export function useMobileTasksProjectDetailLoading<
resetPrFiles()
}, [projectRowItem, client, projectRowDetailRefreshSeq, resetPrFiles])
// Keyed on row id: field edits, merges and reconnects hand over a new object for the same row.
// The comment box is not reset: it is kept per row in its draft row.
const projectRowId = projectRowItem?.id ?? null
useEffect(() => {
setProjectTitleDraft(projectRowItem?.content.title ?? '')
setProjectBodyDraft(projectRowItem?.content.body ?? '')
setProjectCommentDraft('')
setProjectEditingCommentId(null)
setProjectEditingCommentDraft('')
setProjectReviewersDraft('')
@@ -50,6 +50,7 @@ import {
} from './mobile-tasks-legacy-foundation'
import { getTaskPresetQuery } from '../../../src/shared/work-items/task-preset-query'
import { useMobileTasksItemState } from './use-mobile-tasks-item-state'
import { useTaskCommentDraft, useTaskCreateDraft } from './task-draft-rows'
import { useMobileJiraConnectionState } from './use-mobile-jira-connection-state'
import type { JiraIssueFilter } from '../../../src/shared/jira/jira-types'
@@ -165,8 +166,7 @@ export function useMobileTasksRouteAndItemState() {
const [showGitHubPagePicker, setShowGitHubPagePicker] = useState(false)
const [showCreateTask, setShowCreateTask] = useState(false)
const [showCreateTargetPicker, setShowCreateTargetPicker] = useState(false)
const [createTitle, setCreateTitle] = useState('')
const [createBody, setCreateBody] = useState('')
const { createTitle, setCreateTitle, createBody, setCreateBody } = useTaskCreateDraft()
const [createRepoId, setCreateRepoId] = useState<string | null>(null)
const [createTeamId, setCreateTeamId] = useState<string | null>(null)
const [linearTeams, setLinearTeams] = useState<LinearTeam[]>([])
@@ -186,6 +186,7 @@ export function useMobileTasksRouteAndItemState() {
itemState.readDetailPayload,
itemState.reconcilePrFileConnection
)
const [itemCommentDraft, setItemCommentDraft] = useTaskCommentDraft(itemSelection.actionItem)
const [mergeMethodTaskItem, setMergeMethodTaskItem] = useState<
Extract<TaskItem, { provider: 'github' }> | Extract<TaskItem, { provider: 'gitlab' }> | null
>(null)
@@ -360,7 +361,9 @@ export function useMobileTasksRouteAndItemState() {
setPendingProjectGitHubMerge,
pendingHostedStateChange,
setPendingHostedStateChange,
...itemState
...itemState,
itemCommentDraft,
setItemCommentDraft
}
}
@@ -2,6 +2,7 @@ import { useRef, useCallback } from 'react'
import { useBottomDrawerFollowUp } from '../components/bottom-drawer/use-bottom-drawer-follow-up'
import type { RouteAndItemStateModel } from './use-mobile-tasks-route-and-item-state'
import type { WorkspaceSshRecord } from './workspace-ssh-gate'
import { useProjectRowCommentDraft, useTaskCommentDraft } from './task-draft-rows'
import {
type BaseRefSearchResult,
type GitHubProjectPartialFailure,
@@ -86,7 +87,9 @@ export function useMobileTasksWorkspaceAndProjectState(model: RouteAndItemStateM
const [linearStates, setLinearStates] = useState<LinearState[]>([])
const [linearStatesLoading, setLinearStatesLoading] = useState(false)
const [linearStatesError, setLinearStatesError] = useState('')
const [linearCommentDraft, setLinearCommentDraft] = useState('')
const [linearCommentDraft, setLinearCommentDraft] = useTaskCommentDraft(
model.actionItem?.provider === 'linear' ? model.actionItem : null
)
const [linearSubIssueTitle, setLinearSubIssueTitle] = useState('')
const [taskStateHydrated, setTaskStateHydrated] = useState(false)
const [runtimeTaskSettings, setRuntimeTaskSettings] = useState<RuntimeTaskSettings>({})
@@ -131,7 +134,7 @@ export function useMobileTasksWorkspaceAndProjectState(model: RouteAndItemStateM
const [projectRowDetailRefreshSeq, setProjectRowDetailRefreshSeq] = useState(0)
const [projectTitleDraft, setProjectTitleDraft] = useState('')
const [projectBodyDraft, setProjectBodyDraft] = useState('')
const [projectCommentDraft, setProjectCommentDraft] = useState('')
const [projectCommentDraft, setProjectCommentDraft] = useProjectRowCommentDraft(projectRowItem)
const [projectEditingCommentId, setProjectEditingCommentId] = useState<string | null>(null)
const [projectEditingCommentDraft, setProjectEditingCommentDraft] = useState('')
const [projectReviewersDraft, setProjectReviewersDraft] = useState('')
@@ -254,16 +254,25 @@ export function taskItemHostedMetadataMountAdapters(
'use-mobile-tasks-workspace-and-project-state.tsx'
).useMobileTasksWorkspaceAndProjectState
return mountModelHook(modules, context, {
useHook: (model: Parameters<typeof useActions>[0]) => {
useHook: (
model: Parameters<typeof useActions>[0] &
Pick<Parameters<typeof useWorkspace>[0], 'actionItem'>
) => {
const initialDraft = useRef(model.linearCommentDraft)
const { linearCommentDraft, setLinearCommentDraft } = useWorkspace(
mountFixture<Parameters<typeof useWorkspace>[0]>({
actionItem: model.actionItem,
setActionItem: model.setActionItem
})
)
// The comment box is kept per item, so its fixture text goes in once the item is selected.
const seeded = useRef(false)
useLayoutEffect(() => {
setLinearCommentDraft(initialDraft.current)
}, [setLinearCommentDraft])
if (!seeded.current && model.actionItem) {
seeded.current = true
setLinearCommentDraft(initialDraft.current)
}
})
useCommittedOwnerProjection(context, { linearCommentDraft })
return useActions(Object.assign(model, { linearCommentDraft, setLinearCommentDraft }))
},
@@ -1,6 +1,8 @@
import type * as WorkspaceAndProjectStateModule from '../../tasks/use-mobile-tasks-workspace-and-project-state'
import type * as GithubTaskIdentityModule from '../../tasks/github-task-identity'
import type * as TaskItemStateModule from '../../tasks/use-mobile-tasks-item-state'
import type * as TaskDraftRowsModule from '../../tasks/task-draft-rows'
import type * as DurableDraftFieldsModule from '../../drafts/durable-draft-fields'
import { useLayoutEffect, useRef } from 'react'
import type { operationModuleLoader } from './operation-module-loader'
import type { ActionableTaskItem } from '../../tasks/mobile-tasks-project-workspace-types'
@@ -22,13 +24,35 @@ function useTaskStateAndSelection(
const { useMobileTasksSelection, githubTaskKey } = modules.load<typeof GithubTaskIdentityModule>(
'mobile/src/tasks/github-task-identity.ts'
)
const state = useMobileTasksItemState()
const { useTaskCommentDraft } = modules.load<typeof TaskDraftRowsModule>(
'mobile/src/tasks/task-draft-rows.ts'
)
const itemState = useMobileTasksItemState()
const selection = useMobileTasksSelection(
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the mount adapter stores its actual recording client in this field.
model.client as RpcClient,
state.readDetailPayload,
state.reconcilePrFileConnection
itemState.readDetailPayload,
itemState.reconcilePrFileConnection
)
// The comment box is kept per item, so its fixture text goes in once the item is selected.
const [itemCommentDraft, setItemCommentDraft] = useTaskCommentDraft(selection.actionItem)
const state = { ...itemState, itemCommentDraft, setItemCommentDraft }
const { resetDurableDraftFieldsForTests } = modules.load<typeof DurableDraftFieldsModule>(
'mobile/src/drafts/durable-draft-fields.ts'
)
// The recording's document ends at unmount, and its unsaved draft timers end with it as a page's would.
useLayoutEffect(() => resetDurableDraftFieldsForTests, [])
const commentSeeded = useRef(false)
useLayoutEffect(() => {
if (
!commentSeeded.current &&
selection.actionItem &&
typeof fixture.itemCommentDraft === 'string'
) {
commentSeeded.current = true
setItemCommentDraft(fixture.itemCommentDraft)
}
})
useLayoutEffect(() => {
const isStateKey = (key: string): key is keyof typeof state => key in state
for (const [field, value] of Object.entries(fixture)) {