@nuxtseo/pro-indexing 0.1.8 → 0.1.10

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/README.md CHANGED
@@ -150,7 +150,7 @@ The site builds `model` with `buildIndexingOverviewModel(input, diagnose)` from
150
150
 
151
151
  ### Submissions
152
152
 
153
- A Submission is a notification a Site sent to a search engine, through IndexNow or Google's Indexing API. The section answers "what did sending do?" with three rules: an accepted Submission Receipt proves receipt only, "Afterwards" is order in time and never cause, and no string states an indexing timeframe. The shapes live in `shared/submissions.ts` and mirror the gscdump operations `getSiteSubmissionSummary` and `listSiteSubmissionOutcomes`, so a site that reads those maps them as they are.
153
+ A Submission is a notification a Site sent to a search engine, through IndexNow or Google's Indexing API. The section answers "what did sending do?" with three rules: an accepted Submission Receipt proves receipt only, "Afterwards" is order in time and never cause, and no string states an indexing timeframe. The shapes live in `shared/submissions.ts`. Outcomes anchor where gscdump's `listSiteSubmissionOutcomes` anchors them. The source can count distinct URLs or set `countBasis: 'url-sends'` to include repeat sends from `getSiteSubmissionSummary`.
154
154
 
155
155
  ```vue
156
156
  <IndexingSubmissionsCard :site="site">
@@ -164,9 +164,9 @@ A Submission is a notification a Site sent to a search engine, through IndexNow
164
164
  <IndexingSubmissionsCell :site="site" />
165
165
  ```
166
166
 
167
- - `IndexingSubmissionSummary` counts distinct URLs per engine. Each URL counts once per engine, by its latest Submission Receipt. List only the engines the site can send to, even with no URL sent; never add an engine at zero.
167
+ - `IndexingSubmissionSummary` defaults to distinct URLs per engine, by each URL’s latest Submission Receipt. With `countBasis: 'url-sends'`, the help explains that repeat sends count.
168
168
  - `completeness: { _tag: 'partial', receipts }` says the source stopped reading Submission Receipts before the window start. The card says how many it counted.
169
- - `IndexingSubmissionOutcomes` joins each sent URL to Google's latest URL Inspection result from a check made after the URL's first Submission in the window. A result checked before it reads `not-inspected`. `checked` below `sent` says the totals cover fewer URLs than the Site sent, for example when the source caps its lookups. The source never starts a URL Inspection for this read.
169
+ - `IndexingSubmissionOutcomes` joins each sent URL to Google's latest URL Inspection result from a check made after the URL's newest Submission in the window that the engine received: IndexNow at HTTP 200 or HTTP 202, or Google accepted. This matches gscdump's `listSiteSubmissionOutcomes`. A result checked before it reads `not-inspected`. A URL that no engine received stays out of the totals. A source may still return its row, anchored on its newest Submission, so the timeline shows the Submission that failed. `checked` below `sent` says the totals cover fewer URLs than the Site sent, for example when the source caps its lookups or no engine received some URLs. The source never starts a URL Inspection for this read.
170
170
  - `automaticSending` is null when the Site has no IndexNow key. `key-unverified` is the switch on while the key file needs verification.
171
171
  - The URLs table calls `submissionOutcomes(site, { url })` when a person opens a URL's detail, and draws the row whose URL matches, ignoring a trailing slash. Return only that URL's row. The card calls it once with `{ limit: 0 }` for the totals.
172
172
  - `IndexingSubmissionsCell` calls `submissionsRollup()` in each row, so the source must return one shared read, keyed once for the scope, such as a query composable that dedupes by key. Leave the capability out rather than reading once per Site.
@@ -164,9 +164,9 @@ const statusSparklineColors: Record<StepStatus, string> = {
164
164
  /* ─── Inline variant ─── */
165
165
  .inline-pipeline {
166
166
  display: flex;
167
+ flex-wrap: wrap;
167
168
  align-items: flex-start;
168
- gap: 0.375rem;
169
- overflow-x: auto;
169
+ gap: 0.25rem 0.375rem;
170
170
  }
171
171
 
172
172
  .inline-step {
@@ -10,7 +10,7 @@ import { VisAxis, VisCrosshair, VisLine, VisStackedBar, VisTooltip, VisXYContain
10
10
  import { useElementSize } from '@vueuse/core'
11
11
  import { computed, useTemplateRef } from 'vue'
12
12
  import { ClientOnly, NuxtLink, UiAlert, UiButton, UiEmptyState, UiFavicon, UiIcon, UiSkeleton, UiTableShell, UiTableTd, UiTableTh, UiTooltip, UiWidgetState } from '#components'
13
- import { summarizeIndexingChanges } from '../../shared/changes'
13
+ import { countAxisTicks, summarizeIndexingChanges } from '../../shared/changes'
14
14
  import { hasCoverageObservation, isEntryPending, portfolioFetchState } from '../../shared/portfolio'
15
15
  import { useIndexingSource } from '../composables/useIndexingSource'
16
16
  import { useProIndexingCopy } from '../composables/useProIndexingCopy'
@@ -80,18 +80,7 @@ const yDomain = computed<[number, number]>(() => [
80
80
  -Math.max(...days.value.map(day => day.dropped), 0),
81
81
  Math.max(...days.value.map(day => day.indexed), 1),
82
82
  ])
83
- // Counts are whole numbers, so the axis never labels a fraction. The step is a
84
- // 1, 2, or 5 multiple of a power of 10, and never below 1.
85
- const yTickValues = computed(() => {
86
- const [min, max] = yDomain.value
87
- const raw = (max - min) / 4
88
- const power = 10 ** Math.floor(Math.log10(raw))
89
- const step = Math.max(1, [1, 2, 5, 10].find(factor => factor * power >= raw)! * power)
90
- const ticks: number[] = []
91
- for (let value = Math.ceil(min / step) * step; value <= max; value += step)
92
- ticks.push(value)
93
- return ticks
94
- })
83
+ const yTickValues = computed(() => countAxisTicks(yDomain.value))
95
84
 
96
85
  const plotEl = useTemplateRef<HTMLElement>('plotEl')
97
86
  const { width: plotWidth } = useElementSize(plotEl)
@@ -78,7 +78,7 @@ const afterwardsFacts = computed(() => {
78
78
  })
79
79
 
80
80
  function reasonLabel(reason: string): string {
81
- return copy.urls.coverageStates[reason as keyof typeof copy.urls.coverageStates] ?? reason
81
+ return copy.urls.coverageStates[reason as keyof typeof copy.urls.coverageStates] ?? reason.replaceAll('_', ' ')
82
82
  }
83
83
 
84
84
  const automaticState = computed(() => {
@@ -110,7 +110,7 @@ const automaticState = computed(() => {
110
110
  >
111
111
  <div class="flex flex-wrap items-center justify-between gap-x-3 gap-y-1">
112
112
  <h3 :id="headingId" class="text-sm font-strong text-highlighted">
113
- <UiHelpLabel :text="text.title" :tooltip="fillCopy(text.titleTooltip, { days })" />
113
+ <UiHelpLabel :text="text.title" :tooltip="fillCopy(summary?.countBasis === 'url-sends' ? text.urlSendsTooltip : text.titleTooltip, { days })" />
114
114
  </h3>
115
115
  <div class="flex items-center gap-2">
116
116
  <span class="text-mini text-dimmed">{{ fillCopy(text.window, { days }) }}</span>
@@ -9,8 +9,9 @@ import { indexingActionForIssue, parseIndexCohortFilter } from '@gscdump/sdk/ind
9
9
  import { issueDetails, severityOrder } from '@gscdump/sdk/indexing-issues'
10
10
  import { DISPLAY_LOCALE, useProHumanFriendlyNumber } from '@nuxtseo/design-system/app/composables/formatting'
11
11
  import { fillCopy } from '@nuxtseo/pro-shell/shared/copy'
12
+ import { useElementSize } from '@vueuse/core'
12
13
  import { navigateTo, useRoute } from 'nuxt/app'
13
- import { computed, h, onMounted, ref, watch } from 'vue'
14
+ import { computed, h, onMounted, ref, useTemplateRef, watch } from 'vue'
14
15
  import { UiButton, UiChip, UiDataList, UiIcon, UiMetricLabel as UiMetricLabelCell, UiPopover, UiSeverityDot, UiSkeleton, UiSyncDot } from '#components'
15
16
  import { useToast } from '#imports'
16
17
  import { issueIcons } from '../../shared/issue-display'
@@ -42,6 +43,9 @@ const { site, pageSize = 25, shell, forceSkeleton = false } = defineProps<{
42
43
  }>()
43
44
 
44
45
  const source = useIndexingSource()
46
+ // The table scrolls sideways on a phone, and an expanded row spans the whole
47
+ // table. Its detail is held to this visible width so nothing is cut off.
48
+ const { width: visibleWidth } = useElementSize(useTemplateRef<HTMLElement>('root'))
45
49
  const hasSubmissionOutcomes = !!source?.submissionOutcomes
46
50
  const copy = useProIndexingCopy().urls
47
51
  const siteRef = () => site ?? null
@@ -642,7 +646,12 @@ function indexingUrlId(row: GscdumpIndexingUrl): string {
642
646
  </script>
643
647
 
644
648
  <template>
645
- <div class="space-y-3" data-pro-indexing-section="urls">
649
+ <div
650
+ ref="root"
651
+ class="space-y-3"
652
+ data-pro-indexing-section="urls"
653
+ :style="visibleWidth ? { '--idx-visible-width': `${visibleWidth}px` } : undefined"
654
+ >
646
655
  <!-- Facet panel: consolidation targets (canonical_mismatch) -->
647
656
  <UiDataList
648
657
  v-if="facet === 'canonical_mismatch'"
@@ -1033,6 +1042,11 @@ function indexingUrlId(row: GscdumpIndexingUrl): string {
1033
1042
  }
1034
1043
 
1035
1044
  .idx-expanded {
1045
+ /* Stays in view while the table scrolls sideways: the visible width less the
1046
+ row inset on each side and the table border. */
1047
+ position: sticky;
1048
+ left: 0.5rem;
1049
+ max-width: calc(var(--idx-visible-width, 100%) - 1rem - 2px);
1036
1050
  padding: 1rem 1.25rem;
1037
1051
  border-radius: 0.5rem;
1038
1052
  background: color-mix(in srgb, var(--ui-bg-elevated) 20%, transparent);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxtseo/pro-indexing",
3
3
  "type": "module",
4
- "version": "0.1.8",
4
+ "version": "0.1.10",
5
5
  "description": "Nuxt SEO Pro indexing layer: the dashboard indexing sections (Portfolio overview, issues and changes, the per-Site diagnosis panel, coverage trend, Index cohorts, and the indexing URLs table) over one IndexingSource adapter and a route map. Extends @nuxtseo/pro-shell.",
6
6
  "license": "MIT",
7
7
  "homepage": "https://nuxtseo.com",
@@ -37,8 +37,8 @@
37
37
  "@gscdump/contracts": "^7.13.0",
38
38
  "@gscdump/sdk": "^7.13.0",
39
39
  "@nuxt/ui": "^4.11.1",
40
- "@nuxtseo/design-system": "^0.1.8",
41
- "@nuxtseo/pro-shell": "^0.1.8",
40
+ "@nuxtseo/design-system": "^0.1.10",
41
+ "@nuxtseo/pro-shell": "^0.1.10",
42
42
  "@vueuse/core": "^14.0.0 || ^15.0.0",
43
43
  "nuxt": "^4.6.0",
44
44
  "typescript": ">=5.8.0 <7",
@@ -49,11 +49,11 @@
49
49
  "@unovis/vue": "^1.6.7"
50
50
  },
51
51
  "devDependencies": {
52
- "@gscdump/contracts": "7.13.0",
53
- "@gscdump/sdk": "7.13.0",
52
+ "@gscdump/contracts": "7.17.0",
53
+ "@gscdump/sdk": "7.17.0",
54
54
  "@nuxt/ui": "^4.11.1",
55
- "@nuxtseo/design-system": "0.1.8",
56
- "@nuxtseo/pro-shell": "0.1.8",
55
+ "@nuxtseo/design-system": "0.1.10",
56
+ "@nuxtseo/pro-shell": "0.1.10",
57
57
  "@vueuse/core": "^14.4.0",
58
58
  "nuxt": "4.6.1",
59
59
  "site-typecheck": "0.0.0",
package/shared/changes.ts CHANGED
@@ -73,6 +73,22 @@ function windowAxis(through: string, windowDays: number): string[] {
73
73
  new Date(last - (windowDays - 1 - index) * DAY_MS).toISOString().slice(0, 10))
74
74
  }
75
75
 
76
+ /**
77
+ * Y axis ticks for a count chart over `[min, max]`. Counts are whole numbers,
78
+ * so the axis never labels a fraction: the step is a 1, 2, or 5 multiple of a
79
+ * power of 10, and never below 1.
80
+ */
81
+ export function countAxisTicks([min, max]: readonly [number, number]): number[] {
82
+ const raw = (max - min) / 4
83
+ const power = 10 ** Math.floor(Math.log10(raw))
84
+ const step = Math.max(1, [1, 2, 5, 10].find(factor => factor * power >= raw)! * power)
85
+ const ticks: number[] = []
86
+ // `Math.ceil(-0.5)` is `-0`, which a formatter prints as "-0": `|| 0` makes it 0.
87
+ for (let value = Math.ceil(min / step) * step; value <= max; value += step)
88
+ ticks.push(value || 0)
89
+ return ticks
90
+ }
91
+
76
92
  /** The indexed change across the window, or null without two days to compare. */
77
93
  export function indexingLevelChange(trend: readonly IndexingTrendReading[], from: string): IndexingLevelChange | null {
78
94
  const points = trend.filter(point => point.totalUrls > 0 && point.date >= from).toSorted((a, b) => a.date.localeCompare(b.date))
package/shared/copy.ts CHANGED
@@ -125,6 +125,7 @@ const DEFAULTS = {
125
125
  },
126
126
  submissions: {
127
127
  title: 'Sent to search engines',
128
+ urlSendsTooltip: 'URLs sent to search engines in the last {days} days. Each send counts, including repeat sends. An accepted Submission Receipt proves only that the engine received the URL.',
128
129
  titleTooltip: 'URLs sent to search engines in the last {days} days. Each URL counts once per engine, by its latest Submission Receipt. An accepted Submission Receipt proves that the engine received the URL. It does not prove a crawl or indexing.',
129
130
  window: 'Last {days} days',
130
131
  engineIndexNow: 'IndexNow',
@@ -140,10 +141,10 @@ const DEFAULTS = {
140
141
  emptyTitle: 'Tell search engines when URLs change',
141
142
  emptyBody: 'No URLs sent in the last {days} days.',
142
143
  afterwardsTitle: 'Afterwards in Google',
143
- afterwardsTooltip: 'Google\'s latest URL Inspection result for each URL sent, from a check made after it was sent. Not inspected yet means no check since then. It shows what happened next. It does not show that sending caused it.',
144
+ afterwardsTooltip: 'Google\'s latest URL Inspection result for each URL that a search engine received. Only a check made after the engine last received the URL counts. Not inspected yet means no check since then. It shows what happened next. It does not show that sending caused it. Google does not support IndexNow.',
144
145
  afterwardsScope: 'Of {count} URLs sent',
145
146
  afterwardsScopeOne: 'Of 1 URL sent',
146
- afterwardsPartial: 'Google results cover {checked} of the {count} URLs sent.',
147
+ afterwardsPartial: 'These counts cover {checked} of the {count} URLs sent.',
147
148
  indexed: 'Indexed',
148
149
  notIndexed: 'Not indexed',
149
150
  notInspected: 'Not inspected yet',
@@ -1,9 +1,8 @@
1
1
  // Submissions: the notifications a Site sent to a search engine, and what
2
2
  // Google reported afterwards. The `submissions`, `submissionOutcomes` and
3
- // `submissionsRollup` Indexing capabilities return these shapes. They mirror
4
- // the gscdump operations `getSiteSubmissionSummary` and
5
- // `listSiteSubmissionOutcomes`, so a site that reads those maps them as they
6
- // are. A site that cannot read them yet builds them from its receipt lists.
3
+ // `submissionsRollup` Indexing capabilities return these shapes. Outcomes
4
+ // anchor where gscdump's `listSiteSubmissionOutcomes` anchors them. The
5
+ // summary can count distinct URLs or use the engine’s URL send counts.
7
6
  //
8
7
  // Rules every section keeps:
9
8
  // - An accepted receipt proves the engine received the URL. Nothing more.
@@ -31,7 +30,7 @@ export type IndexingReceiptState = 'accepted' | 'in-progress' | 'failed'
31
30
  /** One engine's Submissions in the window. */
32
31
  export interface IndexingSubmissionEngineTotals {
33
32
  readonly engine: IndexingSubmissionEngine
34
- /** Distinct URLs sent. A URL sent twice counts once, by its latest receipt. */
33
+ /** URLs counted using the summary’s countBasis. */
35
34
  readonly urls: number
36
35
  /** `accepted + inProgress + failed` is `urls`. */
37
36
  readonly accepted: number
@@ -79,7 +78,9 @@ export interface IndexingSubmissionSummary {
79
78
  /** The window start, an ISO date-time. */
80
79
  readonly since: string
81
80
  readonly days: number
82
- /** One entry per engine the site can send to, even with no URL sent. An engine the site cannot send to is absent. */
81
+ /** Defaults to counting each distinct URL by its latest receipt. */
82
+ readonly countBasis?: 'url-sends'
83
+ /** One entry per engine reported by the source. */
83
84
  readonly engines: readonly IndexingSubmissionEngineTotals[]
84
85
  /** Null when the Site has no IndexNow key, so Automatic sending cannot turn on. */
85
86
  readonly automaticSending: IndexingAutomaticSending | null
@@ -97,8 +98,12 @@ export interface IndexingSubmissionSend {
97
98
 
98
99
  /**
99
100
  * Google's latest URL Inspection result for a sent URL, from a check made
100
- * after the URL's first Submission in the window. A result checked before
101
- * that Submission does not count: the URL reads `not-inspected`.
101
+ * after the URL's newest Submission in the window that the engine received:
102
+ * IndexNow at HTTP 200 or HTTP 202, or Google accepted. gscdump anchors its
103
+ * outcomes the same way. A result checked before that Submission does not
104
+ * count: the URL reads `not-inspected`. A URL that no engine received stays
105
+ * out of the totals. A source may still return its row, anchored on its newest
106
+ * Submission, so the timeline shows the Submission that failed.
102
107
  */
103
108
  export type IndexingGoogleAfterwards
104
109
  = | { readonly _tag: 'not-inspected' }
@@ -136,7 +141,8 @@ export interface IndexingSubmissionOutcomes {
136
141
  readonly sent: number
137
142
  /**
138
143
  * The URLs the totals cover: `indexed + notIndexed + notInspected`. Below
139
- * `sent` when the source could not check every sent URL.
144
+ * `sent` when the source could not check every sent URL, or when no engine
145
+ * received some of them.
140
146
  */
141
147
  readonly checked: number
142
148
  readonly indexed: number