pierre-review 0.1.55 → 0.1.57

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.
@@ -2,7 +2,8 @@ import { config } from '../../config.js';
2
2
  import { accountToLocalUser } from '../../auth/account.js';
3
3
  import { accountIdOf } from '../plugins/auth.js';
4
4
  import { getProCapabilities } from '../../pro/contract.js';
5
- import { countNewMyTurnFeedItems, dismissMyTurn, getCompletedDismissals, getFeedLastSeenAt, getMyTurn, markFeedSeen, undismissMyTurn, } from '../../db/queries.js';
5
+ import { getFyiProvider } from '../../feed/fyi-provider.js';
6
+ import { dismissMyTurn, getCompletedDismissals, getFeedLastSeenAt, getMyTurn, markFeedSeen, undismissMyTurn, } from '../../db/queries.js';
6
7
  const dismissSchema = {
7
8
  body: {
8
9
  type: 'object',
@@ -24,11 +25,11 @@ export async function meRoutes(app) {
24
25
  const myTurn = await getMyTurn(accountId);
25
26
  // Feed "seen" marker + how many FYI items are new since. Only counted once a
26
27
  // baseline exists (feedLastSeenAt set by the first feed view) so a fresh account
27
- // never sees a scary first-load number.
28
+ // never sees a scary first-load number. FYI is a Pro capability — the count comes
29
+ // from the plugin's enricher (0 on the free tier, where there's no provider).
28
30
  const feedLastSeen = await getFeedLastSeenAt(accountId);
29
- const newFeedItems = feedLastSeen
30
- ? await countNewMyTurnFeedItems(accountId, feedLastSeen)
31
- : 0;
31
+ const fyi = getFyiProvider();
32
+ const newFeedItems = feedLastSeen && fyi ? await fyi.countNewSince(accountId, feedLastSeen) : 0;
32
33
  return {
33
34
  user,
34
35
  counts: {
@@ -0,0 +1,6 @@
1
+ -- The PR's SOURCE branch name (GraphQL `headRefName`), e.g. `feature/PROJ-123-foo` (additive).
2
+ -- The standard carrier of a Jira/Linear ticket key; read by the Pro ticket-link enricher
3
+ -- (compute-on-read) to render deep links in PR detail. Distinct from `base_ref_name` (the
4
+ -- TARGET branch). Nullable; existing rows stay NULL until a sync backfills them.
5
+ -- The Postgres baseline is regenerated separately via `pnpm db:generate:pg`.
6
+ ALTER TABLE `pull_requests` ADD `head_ref_name` text;
@@ -169,6 +169,13 @@
169
169
  "when": 1780800000014,
170
170
  "tag": "0023_ai_usage",
171
171
  "breakpoints": true
172
+ },
173
+ {
174
+ "idx": 24,
175
+ "version": "6",
176
+ "when": 1780800000015,
177
+ "tag": "0024_pr_head_ref_name",
178
+ "breakpoints": true
172
179
  }
173
180
  ]
174
181
  }
@@ -0,0 +1 @@
1
+ ALTER TABLE "pull_requests" ADD COLUMN "head_ref_name" text;