@startsimpli/integrations 0.2.141 → 0.2.142

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startsimpli/integrations",
3
- "version": "0.2.141",
3
+ "version": "0.2.142",
4
4
  "description": "Provider-agnostic types, API clients, hooks, and UI primitives for email + calendar integrations across StartSimpli apps, plus foundry customer email (subpath ./comms).",
5
5
  "license": "MIT",
6
6
  "homepage": "https://startsimpli.com",
@@ -50,9 +50,9 @@
50
50
  "react-native": ">=0.74.0",
51
51
  "@startsimpli/ui-native": ">=0.1.12",
52
52
  "react-native-safe-area-context": ">=4.0.0",
53
- "@startsimpli/auth": "^0.4.50",
53
+ "@startsimpli/ui": "^0.4.171",
54
54
  "@startsimpli/utils": "^0.4.17",
55
- "@startsimpli/ui": "^0.4.171"
55
+ "@startsimpli/auth": "^0.4.50"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "react": {
@@ -150,7 +150,7 @@ describe('TrackerPage — it must not loop', () => {
150
150
  render(<TrackerPage api={api} scope={SCOPE} now={NOW} />);
151
151
  await screen.findByText('Chase the inventor for comments on 2148');
152
152
  expect(calls).toBe(1);
153
- await userEvent.click(screen.getAllByRole('button', { name: 'Done' })[0]);
153
+ await userEvent.click(screen.getAllByRole('button', { name: 'Mark done' })[0]);
154
154
  await new Promise((resolve) => setTimeout(resolve, 150));
155
155
  expect(updated).toHaveLength(1);
156
156
  expect(calls).toBe(2);
@@ -646,3 +646,18 @@ describe('TrackerPage — adding a to-do', () => {
646
646
  expect(screen.queryByRole('textbox', { name: /add a to-do/i })).toBeNull();
647
647
  });
648
648
  });
649
+
650
+ describe('TrackerPage — done fold and blocked reason', () => {
651
+ it('says so when nothing has been finished', async () => {
652
+ render(<TrackerPage api={makeApi({ rows: ROWS.filter((r) => r.status !== 'done') })} scope={SCOPE} now={NOW} />);
653
+ await screen.findByText('Chase the inventor for comments on 2148');
654
+ await userEvent.click(screen.getByText('Done'));
655
+ expect(await screen.findByText(/nothing finished yet/i)).toBeInTheDocument();
656
+ });
657
+
658
+ it('shows why a blocked to-do is blocked', async () => {
659
+ const rows = [commitment({ externalId: 'commit:b1', title: 'Share the staging link', status: 'blocked', statusReason: 'Waiting on DNS' })];
660
+ render(<TrackerPage api={makeApi({ rows })} scope={SCOPE} now={NOW} />);
661
+ expect(await screen.findByText(/Waiting on DNS/)).toBeInTheDocument();
662
+ });
663
+ });
@@ -483,7 +483,7 @@ export function TrackerPage({
483
483
  </h2>
484
484
  <ul>
485
485
  {groups[key].map((entry) => rowFor(entry, canWrite ? {
486
- actions: <button type="button" className={btn} onClick={() => void act(entry.item, { status: 'done' })}>Done</button>,
486
+ actions: <button type="button" className={btn} onClick={() => void act(entry.item, { status: 'done' })}>Mark done</button>,
487
487
  } : undefined))}
488
488
  </ul>
489
489
  </section>
@@ -538,7 +538,7 @@ export function TrackerPage({
538
538
  >
539
539
  <summary className={foldSummary}>Done{doneRows ? ` (${doneGroups.length})` : ''}</summary>
540
540
  <ul className="px-4 pb-3">
541
- {doneRows === null ? <li className={cn.muted}>Loading…</li> : doneGroups.map((entry) => rowFor(entry))}
541
+ {doneRows === null ? <li className={cn.muted}>Loading…</li> : doneGroups.length === 0 ? <li className={cn.muted}>Nothing finished yet.</li> : doneGroups.map((entry) => rowFor(entry))}
542
542
  </ul>
543
543
  </details>
544
544
  </div>
@@ -48,10 +48,13 @@ export function CompactItemRow({ item, days, due, project, trackerName, onOpen,
48
48
  {item.title}
49
49
  </button>
50
50
  ) : <span className="block truncate text-sm font-medium text-gray-900">{item.title}</span>}
51
+ {item.status === 'blocked' && item.statusReason ? (
52
+ <span className="block truncate text-xs text-gray-500">Blocked: {item.statusReason}</span>
53
+ ) : null}
51
54
  </div>
52
55
  <div className="flex shrink-0 items-center gap-2">
53
56
  {project ? <span className={CHIP} title={project}>{project}</span> : null}
54
- {showStatus && item.status !== 'open' && item.status !== 'done' ? <span className={CHIP}>{item.status.replace('_', ' ')}</span> : null}
57
+ {showStatus && item.status !== 'open' && item.status !== 'done' ? <span className={CHIP} title={item.statusReason || undefined}>{item.status.replace('_', ' ')}</span> : null}
55
58
  {item.sync ? <ExternalLinkChip sync={item.sync} trackerName={trackerName} className={CHIP} /> : null}
56
59
  {label ? <span className={`w-16 text-right text-xs ${late ? 'font-semibold text-red-700' : 'text-gray-500'}`}>{label}</span> : null}
57
60
  {actions}