2.8 KiB
2.8 KiB
disco-service-tracker-plugin — Claude Context Overview
A Disco ICT plugin that provides a live service dashboard for open jobs, pulling from both Disco's own database and an NTT Google Sheet. Built entirely in C# as a single-assembly Disco plugin.
Repo
https://gitea.hideawaygaming.com.au/jessikitty/disco-service-tracker-plugin
Current Version
v1.5.9
Key Entry Points
| File | Purpose |
|---|---|
ServiceTrackerPlugin.cs |
Plugin registration, Disco lifecycle hooks |
WebHandler/ServiceTrackerWebHandler.cs |
All HTTP routing, HTML rendering (no Razor — inline string builders) |
Services/ServiceTrackerService.cs |
Dashboard build logic, tile construction, bucket sorting |
Services/GoogleSheetService.cs |
CSV fetch, cache, parse — maps column indices to ExternalTicket |
Services/ServiceTrackerDataStore.cs |
JSON file persistence for tickets, external tickets, config |
Services/DashboardCache.cs |
File-change-based cache invalidation for BuildDashboard |
Models/ServiceTrackerConfig.cs |
Config model incl. GoogleSheetConfig with all column indices |
Models/DashboardViewModel.cs |
DashboardTile, DashboardViewModel, DashboardStats |
Models/ServiceTicket.cs |
Saved ticket overrides, notes, changelog |
ConfigurationHandler/ |
Disco config UI integration |
Architecture Notes
- No Razor/MVC views — all HTML is generated via
StringBuilderinWebHandler - All state persisted as JSON files under
App_Data/Plugins/Disco.Plugins.ServiceTracker/ - NTT sheet tickets get stable integer IDs via a djb2 hash of (timestamp + email + task + issue)
- Dashboard is cached per (sortBy + filterKey); cache busted when any data file changes
- Sidebar panels are mutually exclusive buckets: rfr → onHold → awaitingVendor → awaitingParts → main grid
Google Sheet Integration
- Sheet published as CSV via Google Sheets "Publish to web"
- All column indices configurable via Config UI (0-based; -1 = disabled)
- Location resolved from
ColLocationfirst, thenColCampusas fallback - Unmatched location text stored as
RawSheetLocationon the tile for display - Closed NTT tickets suppressed by
StatusOverridekeyword check, not just sheet status
Versioning Convention
PluginVersion constant in ServiceTrackerService.cs. Bump on every meaningful change.
Credit Footer
All pages: v{version} — Jess Rogerson © 2025
Plugin footnote: Created by: Jess Rogerson (yelling commands at Claude.AI)
Session Log
- 2026-09-23 — Google Sheet Column Remapping, Sidebar Panels & Location Display — Fixed broken column mapping after sheet restructure; added Awaiting Vendor/Parts sidebar panels; made sidebar items clickable; added raw location display on NTT tiles; suppressed closed NTT ticket reappearance