@aarwitz/tapp 0.35.1 → 0.35.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tapp",
|
|
3
3
|
"description": "Give Claude hands and eyes on iOS, Android, and web apps, with exploration, replayable flows, evidence, and deterministic CI gates.",
|
|
4
|
-
"version": "0.35.
|
|
4
|
+
"version": "0.35.4",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Aaron Horowitz",
|
|
7
7
|
"url": "https://github.com/aarwitz"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"command": "npx",
|
|
25
25
|
"args": [
|
|
26
26
|
"-y",
|
|
27
|
-
"@aarwitz/tapp@0.35.
|
|
27
|
+
"@aarwitz/tapp@0.35.4",
|
|
28
28
|
"mcp"
|
|
29
29
|
],
|
|
30
30
|
"cwd": "${CLAUDE_PROJECT_DIR}"
|
|
@@ -542,14 +542,32 @@ class ExplorerTests: XCTestCase {
|
|
|
542
542
|
guard !h.isEmpty else { return nil }
|
|
543
543
|
// textViews included deliberately: chat composers / notes / comment boxes are
|
|
544
544
|
// TextViews, not TextFields — without them "Write a message…" is untypeable.
|
|
545
|
+
// Let a scroll finish before enumerating: the set of fields is read element by element,
|
|
546
|
+
// and a list still gliding changes under the read.
|
|
547
|
+
waitForAnimationsToSettle()
|
|
545
548
|
let fields = app.textFields.allElementsBoundByIndex + app.secureTextFields.allElementsBoundByIndex + app.textViews.allElementsBoundByIndex
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
549
|
+
// Read each field's three names ONCE, through the THROWING snapshot API. A bare
|
|
550
|
+
// `element.identifier` re-resolves against the live tree and fails the entire run with
|
|
551
|
+
// "No matches found for Element at index N" if that element has since moved or gone;
|
|
552
|
+
// `try? snapshot()` hands back nil for the same case, so one shifted row no longer
|
|
553
|
+
// takes the run down (TM-496).
|
|
554
|
+
let described: [(element: XCUIElement, identifier: String, label: String, placeholder: String)] =
|
|
555
|
+
fields.compactMap { element in
|
|
556
|
+
guard let snapshot = try? element.snapshot() else { return nil }
|
|
557
|
+
return (element,
|
|
558
|
+
snapshot.identifier.lowercased(),
|
|
559
|
+
snapshot.label.lowercased(),
|
|
560
|
+
((snapshot.placeholderValue as String?) ?? "").lowercased())
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
// Rank by WHAT matched before where it sits. A single OR pass returns whichever field is
|
|
564
|
+
// highest on screen, so a field whose label happens to equal the hint would beat the
|
|
565
|
+
// field actually named that — precedence the identifier subscripts used to provide, and
|
|
566
|
+
// which was lost when this resolver moved in front of them (caught in review, TM-496).
|
|
567
|
+
if let match = described.first(where: { $0.identifier == h }) { return match.element }
|
|
568
|
+
if let match = described.first(where: { $0.label == h }) { return match.element }
|
|
569
|
+
if let match = described.first(where: { $0.placeholder == h }) { return match.element }
|
|
570
|
+
if let match = described.first(where: { "\($0.identifier) \($0.label) \($0.placeholder)".contains(h) }) { return match.element }
|
|
553
571
|
if h.contains("password") {
|
|
554
572
|
let secure = app.secureTextFields.firstMatch
|
|
555
573
|
if secure.exists { return secure }
|
|
@@ -568,7 +586,7 @@ class ExplorerTests: XCTestCase {
|
|
|
568
586
|
return !l.isEmpty && (l == h || l.contains(h) || h.contains(l))
|
|
569
587
|
}) {
|
|
570
588
|
let zone = overlay.frame.insetBy(dx: -24, dy: -24)
|
|
571
|
-
if let field =
|
|
589
|
+
if let field = described.first(where: { (try? $0.element.snapshot().frame.intersects(zone)) == true })?.element {
|
|
572
590
|
return field
|
|
573
591
|
}
|
|
574
592
|
}
|
|
@@ -651,11 +669,18 @@ class ExplorerTests: XCTestCase {
|
|
|
651
669
|
// submits, and append-on-retry turns "Lemonade" into "LemonadeLemonade" — a malformed
|
|
652
670
|
// credential the server rejects with no visible cause.
|
|
653
671
|
if let id = id, !id.isEmpty {
|
|
654
|
-
|
|
672
|
+
// Enumerate before subscripting. `app.textFields[hint]` builds a query against
|
|
673
|
+
// IDENTIFIERS, and resolving one of those against a SwiftUI `TextField(axis:
|
|
674
|
+
// .vertical)` raises "Failed to get matching snapshot … Automation type mismatch:
|
|
675
|
+
// computed TextField from legacy attrib", which aborts the whole run instead of
|
|
676
|
+
// failing one step (TM-496). resolveFieldByHint walks allElementsBoundByIndex,
|
|
677
|
+
// which does not, and it already prefers an exact identifier match — so this
|
|
678
|
+
// ordering keeps the same precedence and stops the crash.
|
|
679
|
+
if let field = resolveFieldByHint(id) {
|
|
655
680
|
guard replaceText(on: field, with: text) else { return false }
|
|
656
681
|
lastTypedInto = fieldDesc(field); return true
|
|
657
682
|
}
|
|
658
|
-
|
|
683
|
+
for field in [app.textFields[id], app.secureTextFields[id], app.textViews[id]] where field.exists {
|
|
659
684
|
guard replaceText(on: field, with: text) else { return false }
|
|
660
685
|
lastTypedInto = fieldDesc(field); return true
|
|
661
686
|
}
|
|
@@ -1022,7 +1047,18 @@ class ExplorerTests: XCTestCase {
|
|
|
1022
1047
|
return out
|
|
1023
1048
|
}
|
|
1024
1049
|
|
|
1025
|
-
|
|
1050
|
+
// Continue from the screen the app is on, rather than restarting it. A demo is one
|
|
1051
|
+
// story told in several takes, and relaunching between them throws away the first ten
|
|
1052
|
+
// seconds of every recording (home screen, loading, sign-in) and makes each flow sign
|
|
1053
|
+
// in again (TM-498). `activate()` foregrounds a running app; `launch()` always restarts
|
|
1054
|
+
// one. setUp already activates when no launch arguments are configured, so this is the
|
|
1055
|
+
// line that was forcing the restart.
|
|
1056
|
+
let continueFromCurrentScreen = (flow["continue"] as? Bool ?? false) || resolve("OCQA_FLOW_CONTINUE") == "1"
|
|
1057
|
+
if continueFromCurrentScreen && app.state == .runningForeground {
|
|
1058
|
+
app.activate()
|
|
1059
|
+
} else {
|
|
1060
|
+
app.launch()
|
|
1061
|
+
}
|
|
1026
1062
|
waitForUIStability(timeout: 3.0)
|
|
1027
1063
|
let contractStart = contractName.isEmpty ? "" : " contract=\(escapeJSON(contractName))"
|
|
1028
1064
|
print("OCQA_FLOW_RESULT:started total=\(steps.count) name=\(escapeJSON(flow["name"] as? String ?? "flow")) kind=\(evidenceKind)\(contractStart)")
|
|
@@ -5148,6 +5184,85 @@ class ExplorerTests: XCTestCase {
|
|
|
5148
5184
|
return false
|
|
5149
5185
|
}
|
|
5150
5186
|
|
|
5187
|
+
/// What is sitting in front of a field, in the words a person would use.
|
|
5188
|
+
///
|
|
5189
|
+
/// "It never took keyboard focus" is true and useless: it sends whoever reads it hunting
|
|
5190
|
+
/// through screenshots for the reason. Nine times out of ten the reason is something drawn
|
|
5191
|
+
/// over the field — a sheet, a drawer, an alert, a popover — and naming it turns the fix
|
|
5192
|
+
/// into one step (TM-496). Alerts first because they also block everything else, then the
|
|
5193
|
+
/// frontmost container whose frame covers the field's centre.
|
|
5194
|
+
private func whatCovers(_ element: XCUIElement) -> String? {
|
|
5195
|
+
let target = element.frame
|
|
5196
|
+
guard target.width > 0, target.height > 0 else { return nil }
|
|
5197
|
+
let centre = CGPoint(x: target.midX, y: target.midY)
|
|
5198
|
+
|
|
5199
|
+
// Everything below reads through `try? snapshot()`. This runs at the moment a step has
|
|
5200
|
+
// already failed, over every sheet, popover and container on screen — exactly when the
|
|
5201
|
+
// tree is most likely to be mid-change — and a live property read on a row that has
|
|
5202
|
+
// moved fails the whole run instead of this one lookup (TM-496).
|
|
5203
|
+
func firstWords(_ snapshot: XCUIElementSnapshot) -> String {
|
|
5204
|
+
let own = snapshot.label.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
5205
|
+
if !own.isEmpty { return own }
|
|
5206
|
+
let texts = snapshot.children
|
|
5207
|
+
.filter { $0.elementType == .staticText }
|
|
5208
|
+
.prefix(3)
|
|
5209
|
+
.map { $0.label.trimmingCharacters(in: .whitespacesAndNewlines) }
|
|
5210
|
+
.filter { !$0.isEmpty }
|
|
5211
|
+
// Enough to recognise it on the screen, not the whole panel read aloud.
|
|
5212
|
+
let joined = texts.joined(separator: " · ")
|
|
5213
|
+
return joined.count > 60 ? String(joined.prefix(57)) + "…" : joined
|
|
5214
|
+
}
|
|
5215
|
+
|
|
5216
|
+
for alert in app.alerts.allElementsBoundByIndex {
|
|
5217
|
+
guard let snapshot = try? alert.snapshot() else { continue }
|
|
5218
|
+
let what = firstWords(snapshot)
|
|
5219
|
+
return what.isEmpty ? "an alert" : "the alert ‘\(what)’"
|
|
5220
|
+
}
|
|
5221
|
+
// Sheets, popovers and dialogs are unambiguous: if one covers the field, it is the
|
|
5222
|
+
// thing in the way. A plain container is not — every ancestor of the field also
|
|
5223
|
+
// "covers" it — so among those, only consider ones the app gave an accessibility
|
|
5224
|
+
// identifier, which is what authors do to drawers and overlays and not to layout
|
|
5225
|
+
// boxes. When nothing qualifies we say nothing rather than guess at an ancestor.
|
|
5226
|
+
let screen = app.frame.width * app.frame.height
|
|
5227
|
+
var best: (area: CGFloat, text: String)? = nil
|
|
5228
|
+
func holdsAField(_ snapshot: XCUIElementSnapshot) -> Bool {
|
|
5229
|
+
if snapshot.elementType == .textField || snapshot.elementType == .secureTextField || snapshot.elementType == .textView { return true }
|
|
5230
|
+
return snapshot.children.contains(where: holdsAField)
|
|
5231
|
+
}
|
|
5232
|
+
func consider(_ candidate: XCUIElement, _ noun: String, mustNotHoldTheField: Bool) {
|
|
5233
|
+
guard let snapshot = try? candidate.snapshot() else { return }
|
|
5234
|
+
let frame = snapshot.frame
|
|
5235
|
+
guard frame.contains(centre), frame.width > 0, frame.height > 0 else { return }
|
|
5236
|
+
guard screen == 0 || frame.width * frame.height < screen * 0.98 else { return }
|
|
5237
|
+
// Every ancestor of the field also "covers" it. Measured discriminator: an ancestor
|
|
5238
|
+
// contains the text fields of the screen, an overlay drawn on top contains none.
|
|
5239
|
+
if mustNotHoldTheField && holdsAField(snapshot) { return }
|
|
5240
|
+
let what = firstWords(snapshot)
|
|
5241
|
+
guard !what.isEmpty else { return }
|
|
5242
|
+
let area = frame.width * frame.height
|
|
5243
|
+
// The smallest covering thing is the one actually in front, not its container.
|
|
5244
|
+
if best == nil || area < best!.area { best = (area, "the \(noun) ‘\(what)’") }
|
|
5245
|
+
}
|
|
5246
|
+
for candidate in app.sheets.allElementsBoundByIndex { consider(candidate, "sheet", mustNotHoldTheField: false) }
|
|
5247
|
+
for candidate in app.popovers.allElementsBoundByIndex { consider(candidate, "popover", mustNotHoldTheField: false) }
|
|
5248
|
+
for candidate in app.otherElements.allElementsBoundByIndex { consider(candidate, "panel", mustNotHoldTheField: true) }
|
|
5249
|
+
if let best { return best.text }
|
|
5250
|
+
if app.keyboards.firstMatch.exists, app.keyboards.firstMatch.frame.intersects(target) { return "the keyboard" }
|
|
5251
|
+
// Measured on a SwiftUI drawer (a VStack with a .regularMaterial background over the
|
|
5252
|
+
// form): NOTHING in the accessibility tree corresponds to it. An identifier put on such
|
|
5253
|
+
// a container is pushed down onto its child texts, which sit elsewhere on the screen,
|
|
5254
|
+
// and the material itself is not an element at all — every candidate covering the field
|
|
5255
|
+
// was an unnamed full-screen ancestor. So the overlay cannot be named, and claiming
|
|
5256
|
+
// otherwise would be a guess.
|
|
5257
|
+
//
|
|
5258
|
+
// What is still true and still saves the search: the field is on screen and not
|
|
5259
|
+
// hittable, which only happens when something is drawn over it.
|
|
5260
|
+
if !element.isHittable {
|
|
5261
|
+
return "something with no accessibility identity (a drawer or a material overlay shows this way)"
|
|
5262
|
+
}
|
|
5263
|
+
return nil
|
|
5264
|
+
}
|
|
5265
|
+
|
|
5151
5266
|
// Replace existing field contents to avoid repeatedly appending test text. Returns false
|
|
5152
5267
|
// (and records `lastTypeFailure`) instead of letting XCTest abort the run when the field
|
|
5153
5268
|
// cannot be focused.
|
|
@@ -5156,7 +5271,11 @@ class ExplorerTests: XCTestCase {
|
|
|
5156
5271
|
lastTypeFailure = ""
|
|
5157
5272
|
guard focusForTyping(element) else {
|
|
5158
5273
|
let f = element.frame
|
|
5274
|
+
// Say what is in the way before saying what did not happen: the covering element is
|
|
5275
|
+
// the actionable half of this message (TM-496).
|
|
5276
|
+
let covering = whatCovers(element)
|
|
5159
5277
|
lastTypeFailure = "‘\(fieldDesc(element))’ was found (frame \(Int(f.minX)),\(Int(f.minY)) \(Int(f.width))×\(Int(f.height))) but never took keyboard focus, including after dismissing the keyboard and scrolling it into view"
|
|
5278
|
+
+ (covering.map { " — \($0) is in front of it" } ?? "")
|
|
5160
5279
|
+ (app.keyboards.count == 0 ? " — no keyboard appeared" : "")
|
|
5161
5280
|
+ (focusedField().map { " — focus is on ‘\(fieldDesc($0))’" } ?? "")
|
|
5162
5281
|
print("OCQA_STATE:type_focus_failed detail=\(escapeJSON(lastTypeFailure))")
|
package/bin/tapp.js
CHANGED
|
@@ -428,7 +428,7 @@ function safeCommandUsage(verb) {
|
|
|
428
428
|
shot: "tapp look --sim [--out FILE]",
|
|
429
429
|
apps: "tapp apps",
|
|
430
430
|
build: "tapp build [repo] [--scheme NAME] [--configuration NAME]",
|
|
431
|
-
flow: "tapp run FLOW.yml [--var NAME=VALUE ...] [--actor NAME] [--email VALUE] [--password VALUE] [--device \"iPhone 13\"] [--viewport 390x844]\n iOS: [--device \"iPhone 16\"|UDID] chooses the simulator (required when more than one is booted; TAPP_UDID is the default) [--launch-arg ARG] [--launch-env JSON]\ntapp validate FLOW.yml [--platform PLATFORM] [--map FILE]\ntapp validate --example print a complete starter Flow YAML\n Exit codes: 0 replay passed · 1 replay failed · 2 infrastructure/usage error",
|
|
431
|
+
flow: "tapp run FLOW.yml [--var NAME=VALUE ...] [--actor NAME] [--email VALUE] [--password VALUE] [--device \"iPhone 13\"] [--viewport 390x844] [--no-relaunch]\n --no-relaunch continues from the screen the app is on instead of restarting it (iOS)\n iOS: [--device \"iPhone 16\"|UDID] chooses the simulator (required when more than one is booted; TAPP_UDID is the default) [--launch-arg ARG] [--launch-env JSON]\ntapp validate FLOW.yml [--platform PLATFORM] [--map FILE]\ntapp validate --example print a complete starter Flow YAML\n Exit codes: 0 replay passed · 1 replay failed · 2 infrastructure/usage error",
|
|
432
432
|
task: "tapp validate TASK.yml [--platform PLATFORM] [--map FILE]\ntapp validate TASK.yml --compile --platform PLATFORM [--inputs JSON] [--out FILE]\ntapp run TASK.yml --platform PLATFORM [--url URL|--bundle-id ID|--app-id ID] [--inputs JSON]",
|
|
433
433
|
contract: "tapp validate FILE.contract.ts [--platform PLATFORM] [--map FILE]\ntapp validate FILE.contract.ts --compile --platform PLATFORM [--out FILE]\ntapp run FILE.contract.ts --platform PLATFORM [--url URL|--bundle-id ID|--app-id ID]\n Exit codes: 0 contract held · 1 contract failed · 2 infrastructure/usage error",
|
|
434
434
|
scenario: "tapp validate SCENARIO.yml [--project-dir DIR]\ntapp run SCENARIO.yml --platform web --url URL [--project-dir DIR]\n Exit codes: 0 scenario passed · 1 scenario failed · 2 infrastructure/usage error",
|
|
@@ -1591,6 +1591,16 @@ switch (command) {
|
|
|
1591
1591
|
flowVars[name] = value.join("=");
|
|
1592
1592
|
}
|
|
1593
1593
|
if (Object.keys(flowVars).length) env.TAPP_FLOW_VARS = JSON.stringify(flowVars);
|
|
1594
|
+
// Continue from the screen the app is already on. A demo told in several takes should not
|
|
1595
|
+
// restart and sign in again between them (TM-498). iOS today: the other drivers each have
|
|
1596
|
+
// their own notion of a session and are a separate decision.
|
|
1597
|
+
if (flags["no-relaunch"] === true) {
|
|
1598
|
+
if (platform !== "ios") {
|
|
1599
|
+
console.error(`❌ --no-relaunch applies to iOS flows today (this one is ${platform})`);
|
|
1600
|
+
process.exit(2);
|
|
1601
|
+
}
|
|
1602
|
+
env.TAPP_FLOW_CONTINUE = "1";
|
|
1603
|
+
}
|
|
1594
1604
|
|
|
1595
1605
|
let invocation;
|
|
1596
1606
|
if (platform === "web") {
|
|
@@ -2485,7 +2495,7 @@ switch (command) {
|
|
|
2485
2495
|
issue = fb.composeFeedback({ title, body, type, version: pkg.version, doctor, captureId, filedBy: flags.as === "human" ? "human" : "agent" });
|
|
2486
2496
|
} catch (error) { console.error(`❌ ${error.message}\n${usage}`); process.exit(2); }
|
|
2487
2497
|
const url = fb.feedbackIssueUrl(issue);
|
|
2488
|
-
let submitted = false, issueUrl = null;
|
|
2498
|
+
let submitted = false, issueUrl = null, labelsApplied = false;
|
|
2489
2499
|
if (flags.submit === true) {
|
|
2490
2500
|
const status = fb.ghStatus();
|
|
2491
2501
|
if (!status.available) {
|
|
@@ -2499,13 +2509,20 @@ switch (command) {
|
|
|
2499
2509
|
else console.error(`❌ gh issue create failed: ${result.detail}\n Prefilled issue link: ${url}`);
|
|
2500
2510
|
process.exit(1);
|
|
2501
2511
|
}
|
|
2502
|
-
submitted = true; issueUrl = result.url;
|
|
2512
|
+
submitted = true; issueUrl = result.url; labelsApplied = result.labelsApplied;
|
|
2503
2513
|
}
|
|
2504
2514
|
if (flags.json === true) {
|
|
2505
|
-
console.log(JSON.stringify({ ...issue, url, submitted, issueUrl }, null, 2));
|
|
2515
|
+
console.log(JSON.stringify({ ...issue, url, submitted, issueUrl, labelsApplied }, null, 2));
|
|
2516
|
+
break;
|
|
2517
|
+
}
|
|
2518
|
+
if (submitted) {
|
|
2519
|
+
ok("Filed feedback", issueUrl);
|
|
2520
|
+
// Setting labels needs triage rights on the repository, which almost nobody filing has.
|
|
2521
|
+
// Say what happened rather than leaving it to be noticed: the repository labels it on
|
|
2522
|
+
// arrival (.github/workflows/label-feedback.yml).
|
|
2523
|
+
if (!labelsApplied) console.log(` Filed without labels — that needs triage rights. The repository adds ${issue.labels.join(", ")} on arrival.`);
|
|
2506
2524
|
break;
|
|
2507
2525
|
}
|
|
2508
|
-
if (submitted) { ok("Filed feedback", issueUrl); break; }
|
|
2509
2526
|
console.log(`📝 Feedback draft (not filed — issues on ${fb.FEEDBACK_REPO} are public; confirm with the user first):\n`);
|
|
2510
2527
|
console.log(`Title: ${issue.title}\nLabels: ${issue.labels.join(", ")}\n\n${issue.body}`);
|
|
2511
2528
|
console.log(`File it: tapp feedback ${JSON.stringify(issue.title)} … --submit (uses your authenticated gh)\nOr open: ${url}`);
|
|
@@ -90,11 +90,24 @@ export function validateFlowSteps(flow, platform = inferFlowPlatform(flow)) {
|
|
|
90
90
|
return errors;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
/**
|
|
94
|
+
* The variables a Flow's `$NAME` placeholders resolve against, weakest source first:
|
|
95
|
+
* built-in credentials, the Flow's own `vars:` defaults, `tapp run --var NAME=VALUE`, and
|
|
96
|
+
* finally whatever the caller passes explicitly.
|
|
97
|
+
*
|
|
98
|
+
* `--var` arrives as TAPP_FLOW_VARS. It used to be read by the web runner alone, so the same
|
|
99
|
+
* Flow substituted on web and silently did not on iOS, Android or macOS — the flag was accepted,
|
|
100
|
+
* nothing was printed, and the step ran with an unresolved placeholder (field issue #35).
|
|
101
|
+
*/
|
|
93
102
|
export function flowVariables(flow, overrides = {}) {
|
|
103
|
+
let fromCommandLine = {};
|
|
104
|
+
try { fromCommandLine = process.env.TAPP_FLOW_VARS ? JSON.parse(process.env.TAPP_FLOW_VARS) : {}; }
|
|
105
|
+
catch { fromCommandLine = {}; }
|
|
94
106
|
return {
|
|
95
107
|
TEST_EMAIL: process.env.OCQA_TEST_EMAIL || "test@example.com",
|
|
96
108
|
TEST_PASSWORD: process.env.OCQA_TEST_PASSWORD || "TestPass123!",
|
|
97
109
|
...(flow?.vars || {}),
|
|
110
|
+
...fromCommandLine,
|
|
98
111
|
...overrides,
|
|
99
112
|
};
|
|
100
113
|
}
|
package/mcp-server/src/index.js
CHANGED
|
@@ -3229,7 +3229,10 @@ async function handleTool(name, args = {}) {
|
|
|
3229
3229
|
if (!status.available) return errorResult("The GitHub CLI is not authenticated on this machine, so nothing was filed. Give the user the prefilled link instead.", { url, ...issue, submitted: false });
|
|
3230
3230
|
const result = fb.submitFeedbackViaGh(issue);
|
|
3231
3231
|
if (!result.ok) return errorResult(`gh issue create failed: ${result.detail}`, { url, ...issue, submitted: false });
|
|
3232
|
-
|
|
3232
|
+
// Labels need triage rights, which almost no filer has; the repository applies them on
|
|
3233
|
+
// arrival instead (.github/workflows/label-feedback.yml). Say which happened.
|
|
3234
|
+
const labelNote = result.labelsApplied ? "" : `\nFiled without labels — that needs triage rights. The repository adds ${issue.labels.join(", ")} on arrival.`;
|
|
3235
|
+
return richResult(`✅ Filed feedback: ${result.url}${labelNote}`, { submitted: true, issueUrl: result.url, labelsApplied: result.labelsApplied, ...issue });
|
|
3233
3236
|
}
|
|
3234
3237
|
return richResult(
|
|
3235
3238
|
`📝 Feedback drafted, not filed. Issues on ${fb.FEEDBACK_REPO} are public — confirm with the user, then call tapp_feedback again with submit: true, or give them this prefilled link:\n${url}\n\nTitle: ${issue.title}\nLabels: ${issue.labels.join(", ")}\n\n${issue.body}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aarwitz/tapp",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.4",
|
|
4
4
|
"mcpName": "io.github.aarwitz/tapp",
|
|
5
5
|
"description": "Let coding agents verify UI changes on real iOS, Android, and web surfaces, then enforce reviewed proof in deterministic CI.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"mobile"
|
|
99
99
|
],
|
|
100
100
|
"scripts": {
|
|
101
|
-
"test": "node --test tests/report.test.js tests/regression.test.js tests/engine.test.js tests/project-config.test.js tests/application-model.test.js tests/ui-map.test.js tests/focused-navigation.test.js tests/task-runtime.test.js tests/release-contract.test.js tests/pr-selection.test.js tests/flow-runtime.test.js tests/web-explorer.test.js tests/web-session.test.js tests/web-link-audit.test.js tests/web-overlay.test.js tests/web-audit.test.js tests/page-observations.test.js tests/capture-provenance.test.js tests/capture-frames.test.js tests/actor-store.test.js tests/account-store.test.js tests/alerts.test.js tests/access-jwt.test.js tests/oauth.test.js tests/studio-client.test.js tests/journeys.test.js tests/ios-crash-attribution.test.js tests/ios-simulator-selection.test.js tests/ios-recording-stop.test.js tests/web-flow.test.js tests/sign-in.test.js tests/scenario-runtime.test.js tests/android-driver.test.js tests/android-explorer.test.js tests/android-flow.test.js tests/macos-driver.test.js tests/android-primitives-protocol.test.js tests/managed-web.test.js tests/product-operations.test.js tests/job-lanes.test.js tests/browser-product.test.js tests/browser-chat-narration.test.js tests/browser-onboarding.test.js tests/managed-operation.test.js tests/ci-setup.test.js tests/ci-install.test.js tests/cli.test.js tests/mcp-workspace.test.js tests/action.test.js tests/package-surface.test.js tests/agent-surface.test.js tests/platforms.test.js tests/presentation-contract.test.js tests/landing-brand.test.js tests/ci-gate.test.js tests/ci-report.test.js tests/desktop-protocol.test.js tests/ios-flow-protocol.test.js tests/feedback-triage-0919.test.js vscode-extension/test/bridge.test.js",
|
|
101
|
+
"test": "node --test tests/report.test.js tests/regression.test.js tests/engine.test.js tests/project-config.test.js tests/application-model.test.js tests/ui-map.test.js tests/focused-navigation.test.js tests/task-runtime.test.js tests/release-contract.test.js tests/pr-selection.test.js tests/flow-runtime.test.js tests/flow-variables.test.js tests/feedback.test.js tests/web-explorer.test.js tests/web-session.test.js tests/web-link-audit.test.js tests/web-overlay.test.js tests/web-audit.test.js tests/page-observations.test.js tests/capture-provenance.test.js tests/capture-frames.test.js tests/actor-store.test.js tests/account-store.test.js tests/alerts.test.js tests/access-jwt.test.js tests/oauth.test.js tests/studio-client.test.js tests/journeys.test.js tests/ios-crash-attribution.test.js tests/ios-simulator-selection.test.js tests/ios-recording-stop.test.js tests/web-flow.test.js tests/sign-in.test.js tests/scenario-runtime.test.js tests/android-driver.test.js tests/android-explorer.test.js tests/android-flow.test.js tests/macos-driver.test.js tests/android-primitives-protocol.test.js tests/managed-web.test.js tests/product-operations.test.js tests/job-lanes.test.js tests/browser-product.test.js tests/browser-chat-narration.test.js tests/browser-onboarding.test.js tests/managed-operation.test.js tests/ci-setup.test.js tests/ci-install.test.js tests/cli.test.js tests/mcp-workspace.test.js tests/action.test.js tests/package-surface.test.js tests/agent-surface.test.js tests/platforms.test.js tests/presentation-contract.test.js tests/landing-brand.test.js tests/ci-gate.test.js tests/ci-report.test.js tests/desktop-protocol.test.js tests/ios-flow-protocol.test.js tests/feedback-triage-0919.test.js vscode-extension/test/bridge.test.js",
|
|
102
102
|
"test:browser-journey": "node --test tests/browser-journey.test.js",
|
|
103
103
|
"test:browser-native": "TAPP_RUN_NATIVE_BROWSER=1 node --test tests/browser-native-journey.test.js"
|
|
104
104
|
}
|
package/scripts/run-flow.sh
CHANGED
|
@@ -56,6 +56,16 @@ d = {
|
|
|
56
56
|
"OCQA_TEST_EMAIL": os.environ.get("OCQA_TEST_EMAIL", "test@example.com"),
|
|
57
57
|
"OCQA_TEST_PASSWORD": os.environ.get("OCQA_TEST_PASSWORD", "TestPass123!"),
|
|
58
58
|
}
|
|
59
|
+
# `tapp run FLOW --var NAME=VALUE`. The harness has read OCQA_FLOW_VARS since Flows gained
|
|
60
|
+
# variables; nothing ever set it, so on iOS every --var silently resolved to nothing while the
|
|
61
|
+
# same Flow worked on web (field issue #35). Both ends existed; this is the wire between them.
|
|
62
|
+
# `tapp run --no-relaunch`: drive the app as it stands instead of restarting it.
|
|
63
|
+
if os.environ.get("TAPP_FLOW_CONTINUE", "") == "1":
|
|
64
|
+
d["OCQA_FLOW_CONTINUE"] = "1"
|
|
65
|
+
flow_vars = os.environ.get("TAPP_FLOW_VARS", "").strip()
|
|
66
|
+
if flow_vars:
|
|
67
|
+
json.loads(flow_vars) # refuse malformed input here rather than inside the harness
|
|
68
|
+
d["OCQA_FLOW_VARS"] = flow_vars
|
|
59
69
|
launch_args = os.environ.get("OCQA_APP_LAUNCH_ARGS_JSON", "")
|
|
60
70
|
if launch_args:
|
|
61
71
|
value = json.loads(launch_args)
|