create-heresay 0.2.47 → 0.2.49
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.
- package/package.json +1 -1
- package/release/VERSION +1 -1
- package/release/functions/lib/core/handler.js +6 -1
- package/release/functions/lib/core/version.js +1 -1
- package/release/public/dashboard.css +2 -1
- package/release/public/dashboard.js +3 -3
- package/release/public/guides/changes.json +82 -15
- package/release/public/guides/customize-apple.md +21 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-heresay",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.49",
|
|
4
4
|
"description": "Set up your own Heresay: in-app feedback that every report gets a hearing. Creates a Firebase project in your Google account and deploys the dashboard, API and SDK to it.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/release/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.49
|
|
@@ -425,6 +425,10 @@ async function submit(req, deps) {
|
|
|
425
425
|
const { project, headers } = got;
|
|
426
426
|
if (!validDeviceId(body.device_id))
|
|
427
427
|
return json(400, { error: 'bad device_id' }, headers);
|
|
428
|
+
// Sent by the SDK itself after a crash: always Broken (never the client's say), marked as such.
|
|
429
|
+
const auto = body.auto === 'crash';
|
|
430
|
+
if (auto)
|
|
431
|
+
body.type = 'broken';
|
|
428
432
|
if (!isReportType(body.type)) {
|
|
429
433
|
// Refused, never defaulted: the type is the one thing the reporter judged, and it sets
|
|
430
434
|
// the order the developer reads in.
|
|
@@ -449,6 +453,7 @@ async function submit(req, deps) {
|
|
|
449
453
|
id: newId('r_'), project_id: project.id, device_id: body.device_id, type: body.type, text,
|
|
450
454
|
context: parseContext(body.context), reporter: parseReporter(body.reporter), trail: parseTrail(body.trail),
|
|
451
455
|
status: 'open', decline_reason: null, fix_note: null, created_at: at, updated_at: at, triaged_by: null,
|
|
456
|
+
...(auto ? { source: 'crash' } : {}),
|
|
452
457
|
};
|
|
453
458
|
await deps.store.createReport(report);
|
|
454
459
|
await markSeen(project, req, body, deps);
|
|
@@ -458,7 +463,7 @@ async function submit(req, deps) {
|
|
|
458
463
|
if (!project.framework && report.context.framework && !fromSelf) {
|
|
459
464
|
await deps.store.updateProject(project.id, { framework: report.context.framework, framework_detected: true });
|
|
460
465
|
}
|
|
461
|
-
deps.log('api.report_created', { project_id: project.id, report_id: report.id, type: report.type });
|
|
466
|
+
deps.log('api.report_created', { project_id: project.id, report_id: report.id, type: report.type, ...(auto ? { auto: 'crash' } : {}) });
|
|
462
467
|
await notify('new_report', project, report.id, deps);
|
|
463
468
|
return json(201, { report: toReporterView(report) }, headers);
|
|
464
469
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
--broken:#b3261e; --confusing:#8a5100; --improvement:#2d5da8; --idea:#6b4fa8;
|
|
3
3
|
--edge:#cfd4da; --chip:#eceef1; --faint:#8b93a1; --ink:#15171c;
|
|
4
4
|
--t-broken:#fbeceb; --t-confusing:#fbf1e3; --t-improvement:#eaf0fa; --t-idea:#f1edf9;
|
|
5
|
-
--chat-bg:#eef2ff; --chat-fg:#3730a3; --agent-bg:#fef3c7; --agent-fg:#92400e; --sug-bg:#fff7ed; --sug-fg:#7c2d12; --ver-bg:#dcfce7; --ver-fg:#166534;
|
|
5
|
+
--chat-bg:#eef2ff; --chat-fg:#3730a3; --agent-bg:#fef3c7; --agent-fg:#92400e; --crash-bg:#ffe4e6; --crash-fg:#9f1239; --sug-bg:#fff7ed; --sug-fg:#7c2d12; --ver-bg:#dcfce7; --ver-fg:#166534;
|
|
6
6
|
color-scheme:light;
|
|
7
7
|
--head:"Bricolage Grotesque", system-ui, sans-serif; --mono:"JetBrains Mono", ui-monospace, monospace; }
|
|
8
8
|
* { box-sizing:border-box; }
|
|
@@ -445,6 +445,7 @@ a.platform:hover { border-color:var(--acc); box-shadow:0 0 0 3px var(--mist); }
|
|
|
445
445
|
.src-sdk { --src-bg:var(--mist); --src-fg:var(--deep); }
|
|
446
446
|
.src-chat { --src-bg:var(--chat-bg); --src-fg:var(--chat-fg); }
|
|
447
447
|
.src-agent { --src-bg:var(--agent-bg); --src-fg:var(--agent-fg); }
|
|
448
|
+
.src-crash { --src-bg:var(--crash-bg); --src-fg:var(--crash-fg); }
|
|
448
449
|
.src-label { color:var(--src-fg); font-weight:600; }
|
|
449
450
|
.src-label::before { content:''; display:inline-block; width:6px; height:6px; border-radius:50%; background:currentColor; margin-right:5px; vertical-align:1px; }
|
|
450
451
|
|
|
@@ -1336,7 +1336,7 @@
|
|
|
1336
1336
|
advanced.appendChild(el('label', {}, ['Type ', el('select', { 'aria-label': 'Report type', onchange: function () { type = this.value; render(); } },
|
|
1337
1337
|
[el('option', { value: 'all', text: 'All types' })].concat(Object.keys(TYPE_LABEL).map(function (t) { return el('option', { value: t, text: TYPE_LABEL[t] }); })))]));
|
|
1338
1338
|
advanced.appendChild(el('label', {}, ['Source ', el('select', { 'aria-label': 'Report source', onchange: function () { source = this.value; render(); } },
|
|
1339
|
-
[['all', 'All sources'], ['sdk', 'In-app'], ['chat', 'Chat apps'], ['agent', 'Agents']].map(function (t) { return el('option', { value: t[0], text: t[1] }); }))]));
|
|
1339
|
+
[['all', 'All sources'], ['sdk', 'In-app'], ['crash', 'Crashes'], ['chat', 'Chat apps'], ['agent', 'Agents']].map(function (t) { return el('option', { value: t[0], text: t[1] }); }))]));
|
|
1340
1340
|
var heading = el('h1', { text: p ? productName(p) : 'Inbox' });
|
|
1341
1341
|
var controls = el('div', { class: 'inbox-controls' }, [productSelect, platformSelect, filterButton]);
|
|
1342
1342
|
var productTools = el('details', { class: 'inbox-app-tools', hidden: !p }, [el('summary', { text: 'Manage app' })]);
|
|
@@ -1642,8 +1642,8 @@
|
|
|
1642
1642
|
}
|
|
1643
1643
|
|
|
1644
1644
|
// Where a report came from, worded and coloured the same in the list and on the report.
|
|
1645
|
-
function sourceLabel(r) { return r.source === 'agent' ? 'From an agent' : r.source === 'chat' ? 'From ' + (r.via || 'a chat app') : 'From the app'; }
|
|
1646
|
-
function fromApp(r) {
|
|
1645
|
+
function sourceLabel(r) { return r.source === 'agent' ? 'From an agent' : r.source === 'chat' ? 'From ' + (r.via || 'a chat app') : r.source === 'crash' ? 'Sent automatically after a crash' : 'From the app'; }
|
|
1646
|
+
function fromApp(r) { var s = r.source || 'sdk'; return s === 'sdk' || s === 'crash'; }
|
|
1647
1647
|
function sourceTag(r, cls) { return el('span', { class: cls + ' src-' + (r.source || 'sdk'), text: sourceLabel(r) }); }
|
|
1648
1648
|
|
|
1649
1649
|
function deviceView(c) {
|
|
@@ -1,51 +1,118 @@
|
|
|
1
1
|
{
|
|
2
2
|
"about": "Features added to Heresay since apps were first installed. An agent in a connected repo checks these with whats_new, tells the person what's new, and asks before adding any. `detect` is what the code contains once a feature is in; `platforms` limits it to those apps; `sign_in` limits it to apps that answered that.",
|
|
3
3
|
"changes": [
|
|
4
|
+
{
|
|
5
|
+
"id": "crash-reports",
|
|
6
|
+
"since": "0.2.48",
|
|
7
|
+
"title": "Get crash reports without anyone sending them",
|
|
8
|
+
"summary": "With crashReports: .send, a Mac or iOS app reports a run that ended badly (a crash, a hang, running out of memory, a force quit) by itself at the next launch, with what happened before it and how it crashed. It arrives even when the app crashes on every launch, as long as Heresay.configure runs first. It waits in the inbox for a person like any report. Off until the app turns it on; it sends diagnostics without asking, so the app's privacy details should say so.",
|
|
9
|
+
"platforms": [
|
|
10
|
+
"ios",
|
|
11
|
+
"macos"
|
|
12
|
+
],
|
|
13
|
+
"detect": [
|
|
14
|
+
"crashReports:"
|
|
15
|
+
],
|
|
16
|
+
"how": {
|
|
17
|
+
"ios": "guide customize-apple, Crash reports",
|
|
18
|
+
"macos": "guide customize-apple, Crash reports"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
4
21
|
{
|
|
5
22
|
"id": "nudge",
|
|
6
23
|
"since": "0.2.21",
|
|
7
24
|
"title": "Offer help when someone seems stuck",
|
|
8
25
|
"summary": "A small note by the Report button asks “Something not working?” when someone presses a button again and again with nothing happening, hits an error right after a click, or sees requests fail (web), clicks a disabled control again and again (macOS), or comes back after a crash (iOS and macOS). And “Stuck on something?” when someone seems unsure: typing that stopped, going back and forth between the same few pages or screens, a field refused again and again. It opens the form as Broken or Confusing, with what happened attached. Watched on the device, never sent; once per visit, and quiet for a week after “Not now”. Off until the app turns it on.",
|
|
9
|
-
"platforms": [
|
|
10
|
-
|
|
11
|
-
|
|
26
|
+
"platforms": [
|
|
27
|
+
"web",
|
|
28
|
+
"ios",
|
|
29
|
+
"macos"
|
|
30
|
+
],
|
|
31
|
+
"detect": [
|
|
32
|
+
"data-nudge",
|
|
33
|
+
"nudge:",
|
|
34
|
+
"nudge()"
|
|
35
|
+
],
|
|
36
|
+
"how": {
|
|
37
|
+
"web": "guide customize-web, Offering help",
|
|
38
|
+
"ios": "guide customize-apple, Offering help",
|
|
39
|
+
"macos": "guide customize-apple, Offering help"
|
|
40
|
+
}
|
|
12
41
|
},
|
|
13
42
|
{
|
|
14
43
|
"id": "design-apple",
|
|
15
44
|
"since": "0.2.11",
|
|
16
45
|
"title": "Make Heresay fit the app",
|
|
17
46
|
"summary": "The Swift package takes a HeresayStyle: another corner or clear a tab bar, say “Feedback” instead of “Report”, a quieter button, the app's light or dark theme, French, Tamil or Hindi, a half-height or full-screen sheet, or only some report types. The dashboard's Design page shows each choice and gives the Swift.",
|
|
18
|
-
"platforms": [
|
|
19
|
-
|
|
20
|
-
|
|
47
|
+
"platforms": [
|
|
48
|
+
"ios",
|
|
49
|
+
"macos"
|
|
50
|
+
],
|
|
51
|
+
"detect": [
|
|
52
|
+
"HeresayStyle("
|
|
53
|
+
],
|
|
54
|
+
"how": {
|
|
55
|
+
"ios": "guide customize-apple",
|
|
56
|
+
"macos": "guide customize-apple"
|
|
57
|
+
}
|
|
21
58
|
},
|
|
22
59
|
{
|
|
23
60
|
"id": "design-web",
|
|
24
61
|
"since": "0.2.11",
|
|
25
62
|
"title": "Make the Report button fit the app",
|
|
26
63
|
"summary": "The web widget can take the app's colour (the logo follows it), sit in another corner or clear a chat bubble, say “Feedback” instead of “Report”, follow the app's light or dark theme, speak French, Tamil or Hindi, or have no floating button when the app has its own feedback menu item. The dashboard's Design page shows each choice on the real widget.",
|
|
27
|
-
"platforms": [
|
|
28
|
-
|
|
29
|
-
|
|
64
|
+
"platforms": [
|
|
65
|
+
"web"
|
|
66
|
+
],
|
|
67
|
+
"detect": [
|
|
68
|
+
"data-accent",
|
|
69
|
+
"data-hide-on",
|
|
70
|
+
"data-backdrop",
|
|
71
|
+
"data-preferences"
|
|
72
|
+
],
|
|
73
|
+
"how": {
|
|
74
|
+
"web": "guide customize-web"
|
|
75
|
+
}
|
|
30
76
|
},
|
|
31
77
|
{
|
|
32
78
|
"id": "introduce",
|
|
33
79
|
"since": "0.2.7",
|
|
34
80
|
"title": "Tell people Heresay is there",
|
|
35
81
|
"summary": "A one-time introduction, so the people using the app know they can report things. On macOS it names Help › Report a Problem… (⌥⌘R), on iOS the Report button, on the web a bubble over the button. Shown once per device.",
|
|
36
|
-
"platforms": [
|
|
37
|
-
|
|
38
|
-
|
|
82
|
+
"platforms": [
|
|
83
|
+
"web",
|
|
84
|
+
"ios",
|
|
85
|
+
"macos"
|
|
86
|
+
],
|
|
87
|
+
"detect": [
|
|
88
|
+
"introduce(",
|
|
89
|
+
"data-intro"
|
|
90
|
+
],
|
|
91
|
+
"how": {
|
|
92
|
+
"web": "guide install-web, step 4",
|
|
93
|
+
"ios": "guide install-apple, step 5",
|
|
94
|
+
"macos": "guide install-apple, step 5"
|
|
95
|
+
}
|
|
39
96
|
},
|
|
40
97
|
{
|
|
41
98
|
"id": "identify-email",
|
|
42
99
|
"since": "0.2.6",
|
|
43
100
|
"title": "Signed-in people are never asked who they are",
|
|
44
101
|
"summary": "When the app tells Heresay who is signed in (id, name, email), the report form stops asking for a name and email, and the team can reply to them.",
|
|
45
|
-
"platforms": [
|
|
102
|
+
"platforms": [
|
|
103
|
+
"web",
|
|
104
|
+
"ios",
|
|
105
|
+
"macos"
|
|
106
|
+
],
|
|
46
107
|
"sign_in": "yes",
|
|
47
|
-
"detect": [
|
|
48
|
-
|
|
108
|
+
"detect": [
|
|
109
|
+
"identify("
|
|
110
|
+
],
|
|
111
|
+
"how": {
|
|
112
|
+
"web": "guide install-web, step 3",
|
|
113
|
+
"ios": "guide install-apple, step 4",
|
|
114
|
+
"macos": "guide install-apple, step 4"
|
|
115
|
+
}
|
|
49
116
|
}
|
|
50
117
|
]
|
|
51
118
|
}
|
|
@@ -83,6 +83,27 @@ asked.
|
|
|
83
83
|
| --- | --- |
|
|
84
84
|
| `configure(…, nudge:)` | `[]` (default, off) · `.all` · `.clicks` (macOS: a disabled control clicked 3 times in 10 s, or one spot clicked 5 times in 2 s; leave it out for games and drawing apps) · `.crash` (the app crashed last time; once, at the next launch) · `.circles` (6 screen changes in a minute among at most 3 screens; needs named screens) · `.stalled` (typed, then 45 s still editing with nothing more: the keyboard still up on iOS; search fields don't count). The last two say "Stuck on something?" and open as Confusing. |
|
|
85
85
|
|
|
86
|
+
**Crash reports**
|
|
87
|
+
|
|
88
|
+
Off by default: a crash waits on the device and goes with the next report someone sends. Turn on
|
|
89
|
+
`crashReports: .send` when the team wants every crash, including ones nobody reports, for example
|
|
90
|
+
an app that crashes on launch for some people:
|
|
91
|
+
|
|
92
|
+
```swift
|
|
93
|
+
Heresay.configure(key: "KEY", url: URL(string: "HERESAY_URL")!, crashReports: .send)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
At the next launch after a run that ended badly (a crash, a hang the system killed, running out
|
|
97
|
+
of memory, a force quit), Heresay reports it as Broken, with that run's last five minutes, the
|
|
98
|
+
app's logged errors and, once macOS or iOS hands it over, how it crashed. It shows in the inbox as
|
|
99
|
+
"Sent automatically after a crash" and waits for a person like any report. Once per bad run, at
|
|
100
|
+
most three a day per device. It goes as a background upload, so it arrives even if the app
|
|
101
|
+
crashes again straight away, as long as `configure` runs first: keep it the first line of the
|
|
102
|
+
`App`'s `init`, before anything that could crash.
|
|
103
|
+
|
|
104
|
+
It sends diagnostics without asking, so tell the person: their privacy policy should say so, and
|
|
105
|
+
on the App Store their privacy details should list Crash Data and Other Diagnostic Data.
|
|
106
|
+
|
|
86
107
|
Screens make the trail readable: if the app has several screens and doesn't name them yet, add
|
|
87
108
|
`.heresayScreen("<name>")` to each screen's root view.
|
|
88
109
|
|