User reported 'still broken' on /ui/tags/ai/ right after the 20-card cap
shipped — the deployed HTML was correct (verified in-pod: 20 cards + View
all 363 posts) but Safari was serving a heuristically cached copy of the
previous template. UI HTML responses had no Cache-Control at all.
- core/middleware.NoCacheUiPagesMiddleware: /ui/* HTML → Cache-Control:
no-cache, no-store, must-revalidate (+ Pragma/Expires). API untouched.
- tag_detail: defensive width:100% + box-sizing on .tags-page/.apple-card
- Add django.contrib.humanize; apply intcomma to every currency amount across invest templates (dashboard, portfolio detail, transactions)
- get_risk_summary now aggregates top_positions by ticker (MRVL across MOMO+IBKR merges into one row with Accounts column), keeping Top 1/3/5 cards and table on the same basis
- Mobile: metric cards all 2-col (2x2 + 2+1 with Last Snapshot spanning full width), no more 1-col break
- Transactions show source badges: purple 🤖 AI (source ai/ocr), grey 手动, amber ⚠ 低置信 when confidence < 0.9
- Delete unused invest/base.html (dead nav; page extends GoLinks base.html)
- tailwind.config.js: add invest/jbot/routermon template dirs so their classes are scanned (text-[10px] etc. were silently missing)
Remove hardcoded /ask/ routes (core/urls.py), /api/ask/ (api_urls.py),
ask_views.py, and ask.html input page. Ask is now a normal Link record
(alias='ask', link_type=ACTION) created by data migration 0053, so it
behaves exactly like other action links: go/ask/问题 → catch-all →
execute_action → 302 to Discord, editable/deletable in the Links UI.
Tests updated: ask covered as ACTION link (redirect/dedup/empty-query).
- Portfolio management (MOMO, IBKR personal, IBKR Yanhua)
- Stock holdings with transaction history (buy/sell)
- Weekly AI report generation
- Real-time price cache via Finnhub API
- Dashboard with tree view and performance charts
- REST API with AI-friendly batch update endpoint
- Management command for scheduled report generation
For大哥's personal investment advisor system.
- Rewrite nginxmon/geo.py to use maxminddb + DB-IP City Lite MMDB
(https://cdn.jsdelivr.net/npm/dbip-city-lite/dbip-city-lite.mmdb.gz)
instead of ip-api.com HTTP API — eliminates all network timeouts and
rate-limit issues; lookups are now sub-millisecond in-process
- Keep _lookup_batch() signature unchanged so routermon receiver
requires no changes
- MMDB downloaded on first use (lazy) and refreshed monthly via
APScheduler; reader cached module-level (thread-safe for reads)
- Add management command: manage.py download_geo_db
- Update k8s init container to download MMDB on first deploy if absent
- Add maxminddb==3.1.1 dependency
CC BY 4.0 — DB-IP (https://db-ip.com)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove SO_REUSEADDR from UDP socket so only one gunicorn worker binds
port 5514 (second worker intentionally gets EADDRINUSE and skips)
- Add print() fallback for bind confirmation/errors so startup is visible
even when Django logging config is not fully set up
- Fix duplicate LOGGING dict in settings.py: second assignment was
overriding the first and removing the root logger handler, silently
swallowing all routermon/core startup logs
- Add sys.stderr fallback in core/apps.py ready() for startup exceptions
- Fix JS SyntaxError: {{ top_domains_json }} needs |safe filter since
Django auto-escapes quotes to " inside script tags
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The knowledge graph feature (links graph) was not functioning correctly
and was slowing down the application. This commit removes it entirely:
- Delete knowledge_graph_urls.py, knowledge_graph_views.py, llm_client.py
- Delete knowledge_graph.html template
- Remove KnowledgeGraphSnapshot model and all llm_*/kg_* fields from
SiteSettings (migration 0048)
- Remove build_knowledge_graph() and schedule_kg_build() from tasks.py
- Remove KG settings save logic and bulk delete action from views.py
- Remove knowledge_graph_urls include from links/urls.py
- Remove schedule_kg_build scheduler job from core/apps.py
- Remove KG snapshot job registry from links/apps.py
- Remove Knowledge Graph nav item from base.html
- Remove KG settings cards and llmSettingsHelper JS from settings.html
- Move routes to top of urlpatterns (before catch-all alias resolver)
- Serve directly from committed static/ dir instead of staticfiles/ (STATIC_ROOT)
so they work without collectstatic being run
- Eliminates APPEND_SLASH redirect to alias catch-all when file not in staticfiles/
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add operationId to all 20 API operations
- Add tag groups (Pages, Posts, Collections, Images, Files) with descriptions
- Enrich info.description with concept table, usage patterns, and examples
- Add /llms.txt (llmstxt.org standard) with plain-text API overview
- Add /.well-known/ai-plugin.json (OpenAI plugin manifest)
- Add URL routes for llms.txt and ai-plugin.json
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>