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.
- package/dist/api/routes/me.js +6 -5
- package/dist/db/migrations/0024_pr_head_ref_name.sql +6 -0
- package/dist/db/migrations/meta/_journal.json +7 -0
- package/dist/db/migrations-pg/0013_yielding_nicolaos.sql +1 -0
- package/dist/db/migrations-pg/meta/0013_snapshot.json +2534 -0
- package/dist/db/migrations-pg/meta/_journal.json +7 -0
- package/dist/db/queries.js +82 -158
- package/dist/db/schema.pg.js +3 -0
- package/dist/db/schema.sqlite.js +4 -0
- package/dist/feed/fyi-provider.js +10 -0
- package/dist/github/queries.js +1 -0
- package/dist/pr/detail-enricher.js +26 -0
- package/dist/pro/bind.js +9 -3
- package/dist/pro/contract.js +3 -0
- package/dist/sync/scheduled-jobs.js +12 -0
- package/dist/sync/scheduler.js +22 -0
- package/dist/sync/upsert.js +2 -0
- package/package.json +1 -1
- package/public/assets/{index-DPXMXoyL.js → index-BdkrDPhY.js} +102 -102
- package/public/assets/index-GFkviVe0.css +10 -0
- package/public/index.html +2 -2
- package/public/assets/index-BKNNIALz.css +0 -10
package/dist/api/routes/me.js
CHANGED
|
@@ -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 {
|
|
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
|
|
30
|
-
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "pull_requests" ADD COLUMN "head_ref_name" text;
|