Commit Graph

109 Commits

Author SHA1 Message Date
primal
26de5d3753 Add status column to items table
Items now have a status column ('pass' or 'fail', default 'pass') to
control publishing eligibility. Includes migration for existing databases.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 15:46:33 -05:00
primal
6eaa39f9db Remove publishing code - now handled by publish service
Publishing functionality has been moved to the standalone publish service.
Removed:
- publisher.go, pds_auth.go, pds_records.go, image.go, handle.go
- StartPublishLoop and related functions from crawler.go
- Publish loop invocation from main.go

Updated CLAUDE.md to reflect the new architecture.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 15:40:49 -05:00
primal
7b50f5c008 Update shared references to commons 2026-02-02 15:19:48 -05:00
primal
bd76ea1108 Trim shortener.go - keep only URL creation, remove click tracking
Click tracking now handled by tracker service.
Reduced from 250 to 79 lines.
2026-02-02 13:28:10 -05:00
primal
aea101a5e7 Update short URLs to use news.1440.news 2026-02-02 13:23:24 -05:00
primal
ec53ad59db Phase 5: Remove dashboard code from crawler
Removed dashboard-related files (now in standalone dashboard/ service):
- api_domains.go, api_feeds.go, api_publish.go, api_search.go
- dashboard.go, templates.go
- oauth.go, oauth_handlers.go, oauth_middleware.go, oauth_session.go
- routes.go
- static/dashboard.css, static/dashboard.js

Updated crawler.go:
- Removed cachedStats, cachedAllDomains, statsMu fields
- Removed StartStatsLoop function

Updated main.go:
- Removed dashboard startup
- Removed stats loop and UpdateStats calls

The crawler now runs independently without dashboard.
Use the standalone dashboard/ service for web interface.
2026-02-02 13:08:48 -05:00
primal
fa82d8b765 Move plan to dedicated plans/ directory
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 12:40:48 -05:00
primal
98bee87c05 Add dashboard separation plan
Tracking file-by-file migration of dashboard code from app/ to dashboard/ service.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 12:39:08 -05:00
primal
bce9369cb8 Fix OAuth session storage - add missing database columns
- Add dpop_authserver_nonce, dpop_pds_nonce, pds_url, authserver_iss columns
- These columns are required by GetSession query but were missing from schema
- Add migrations to create columns on existing tables
- Add debug logging for OAuth flow troubleshooting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 00:44:19 -05:00
primal
86d669e08e Make oauth_sessions.access_token nullable
Session is created before tokens are obtained during OAuth flow.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 00:35:53 -05:00
primal
265975c7c5 Rename sessions table to oauth_sessions for consistency
- Update schema to create oauth_sessions instead of sessions
- Add migration to rename existing sessions table
- Add token_expiry column for OAuth library compatibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 00:34:13 -05:00
primal
615aa6ef5d Fix TLD sync to use domain_tld column for feeds table
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:52:29 -05:00
primal
3f277ec165 Remove item ID column references - items now use composite PK (guid, feed_url)
- Remove ID field from Item struct
- Remove ID field from SearchItem struct
- Update all SQL queries to not select id column
- Change MarkItemPublished to use feedURL/guid instead of id
- Update shortener to use item_guid instead of item_id
- Add migration to convert item_id to item_guid in short_urls table
- Update API endpoints to use feedUrl/guid instead of itemId

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:51:44 -05:00
primal
7ec4207173 Migrate to normalized FK schema (domain_host, domain_tld)
Replace source_host column with proper FK to domains table using
composite key (domain_host, domain_tld). This enables JOIN queries
instead of string concatenation for domain lookups.

Changes:
- Update Feed struct: SourceHost/TLD → DomainHost/DomainTLD
- Update all SQL queries to use domain_host/domain_tld columns
- Add column aliases (as source_host) for API backwards compatibility
- Update trigram index from source_host to domain_host
- Add getDomainHost() helper for extracting host from domain

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:36:25 -05:00
primal
e7f6be2203 Add internal crawl endpoint without auth
For triggering priority crawls from internal network.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:59:39 -05:00
primal
edf54ca212 Add graceful shutdown for goroutines
- Add shutdownCh channel to signal goroutines to stop
- Check IsShuttingDown() in all main loops
- Wait 2 seconds for goroutines to finish before closing DB

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:23:57 -05:00
primal
81146fd572 Fix domain search when pattern looks like domain
When searching for "npr.org" and viewing the .org TLD, use the host part
("npr") for matching instead of the full pattern ("npr.org").

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:19:21 -05:00
primal
7011b126fe Fix tld_enum comparison - cast to text instead of LOWER()
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:13:21 -05:00
primal
f2978e7ab5 Clean up debug logging
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:11:49 -05:00
primal
8a9001c02c Restore working codebase with all methods
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:08:53 -05:00
primal
211812363a Add TLD sync loop for IANA TLD updates
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:07:43 -05:00
primal
d41f9cc7c9 Fix blocking TLD sync loop - add missing go keyword
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:05:50 -05:00
primal
c6ec482d1f Add exact domain matching for domain-like search queries
When searching for patterns like "npr.org", the search now also matches
the exact domain (host=npr, tld=org) in addition to the existing text
search across domain names, feed URLs, titles, and descriptions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:00:50 -05:00
primal
71d8ec0a39 Resize small cards to 115px
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:04:01 -05:00
primal
03dcf1cedc Resize small cards to 110px
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:02:28 -05:00
primal
a34a284d77 Use Unix timestamp for cache busting, remove version display
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:01:04 -05:00
primal
49c2370d84 Resize small cards to 100px
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:00:00 -05:00
primal
02564bfde7 Fix CSS/JS cache busting - sync versions on launch
.launch.sh now updates CSS and JS query params to match app version.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 17:58:55 -05:00
primal
3a28518366 Resize small cards to 80px
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 17:56:55 -05:00
primal
c50ee3b03e Resize small cards to 100px
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 17:52:53 -05:00
primal
f307e6c845 Add guards to skip migrations if already done
Checks column types before running ALTER TYPE migrations to avoid
slow table scans on every restart. Also guards column renames.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 17:44:35 -05:00
primal
58bb560ae6 Resize small cards to 110px
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 17:27:56 -05:00
primal
dd17889695 Rename rate cards: alive/min, crawl/min, check/min
Shorter, cleaner labels for the dashboard rate cards.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 17:26:18 -05:00
primal
be595cb403 v100 2026-01-30 22:35:08 -05:00
primal
f49fc2f0ad v59: simplify to single feeds view with search 2026-01-30 17:16:14 -05:00
primal
9530c2ceab v58: remove all explicit font-sizes, reduce feed indentation 2026-01-30 17:11:31 -05:00
primal
3405e31f2c v57: remove font-size from stats to use default 2026-01-30 17:07:42 -05:00
primal
3147b4e48a v56: standardize font sizes to match domain name 2026-01-30 17:06:24 -05:00
primal
c5ad66ee81 v55: fix item_count to query actual DB count 2026-01-30 17:05:07 -05:00
primal
406f9397c2 v54: fix d:feeds to load items 2026-01-30 17:02:18 -05:00
primal
a3d8f4ea8e v53: add feed info and items panels with click toggles 2026-01-30 16:59:38 -05:00
primal
442e010672 v52: simplify feed row: status, count, path, title inline 2026-01-30 16:49:38 -05:00
primal
6c9702eebc v51: remove debug logging 2026-01-30 16:43:23 -05:00
primal
2289d73288 v50: add debug logging for spacer click 2026-01-30 16:41:56 -05:00
primal
51d05e18a1 v49: fix spacer click using event delegation 2026-01-30 16:39:20 -05:00
primal
57801d0946 v48: domain name links to site, spacer toggles feeds 2026-01-30 16:36:14 -05:00
primal
5b3330ba07 v47: Fix d:feeds auto-expand for hidden container 2026-01-30 16:31:32 -05:00
primal
97051f3967 v46: Click domain name to toggle feeds div 2026-01-30 16:29:05 -05:00
primal
cf34db1e6c v45: Auto-expand feed details in d:feeds mode 2026-01-30 16:23:03 -05:00
primal
f59e7dcbc3 v44: Left-justify TLD footer 2026-01-30 16:19:08 -05:00