Tidy stale comments and duplicated helpers
Test and publish / test (push) Successful in 1m6s
Test and publish / publish (push) Has been skipped

Comments carried over from web_server (CVLayout.vue, messageResolver,
the Spotify token code) and ones outdated by later changes (the email
window now anchors on ReceivedAt, failed emails are retried) are
corrected. truncateRunes had a copy in handlers and in services; there
is now one, services.TruncateRunes. cleanEmailBody's regexes are
compiled once, a status check that could never fire is gone, and
api.js loses its unused put/patch helpers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-14 22:47:27 +01:00
co-authored by Claude Opus 5.5
parent f5b722d100
commit c7b60578e1
10 changed files with 54 additions and 72 deletions
+12 -13
View File
@@ -1,11 +1,3 @@
package models
import (
"time"
"gorm.io/gorm"
)
// Package models holds the GORM entities, which are also the GraphQL object
// types: gqlgen.yml maps each GraphQL type straight onto the struct here, so
// graph/model/ only contains generated input and payload types. That means
@@ -23,6 +15,13 @@ import (
// - IDs are uint here and the ID scalar in GraphQL. gqlgen.yml binds the
// two directly (graphql.UintID), so an `ID uint` field needs no resolver.
// On the wire an id is a quoted decimal string, "12".
package models
import (
"time"
"gorm.io/gorm"
)
// JobAppReference is a reusable snippet for filling in job application forms
// (a stock answer, a profile link, and so on), grouped by Category and
@@ -41,11 +40,11 @@ type JobAppReference struct {
// ProcessedEmail records that the email pipeline has already looked at a
// message, so it is never classified twice.
//
// Unlike every other model it has no DeletedAt and so is NOT soft deleted —
// the dedup check must see every historical row. Its CreatedAt also drives
// the next sync's time window, so the most recent row here is effectively the
// pipeline's cursor. A row is written even when classification failed, with
// Action "error", which means failures are never retried.
// Like JobLead it has no DeletedAt and so is NOT soft deleted — the dedup
// check must see every historical row. Its ReceivedAt drives the next sync's
// time window, so the newest row here is effectively the pipeline's cursor. A
// row is written even when classification failed, with Action "error"; see
// Attempts for how those are retried.
type ProcessedEmail struct {
ID uint `gorm:"primarykey" json:"id"`
CreatedAt time.Time `json:"createdAt"`