source_monitor 0.3.3 → 0.5.0
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.
- checksums.yaml +4 -4
- data/.claude/commands/release.md +101 -58
- data/.claude/skills/sm-configure/SKILL.md +13 -2
- data/.claude/skills/sm-configure/reference/configuration-reference.md +33 -0
- data/.claude/skills/sm-host-setup/SKILL.md +18 -2
- data/.claude/skills/sm-host-setup/reference/setup-checklist.md +33 -0
- data/.claude/skills/sm-job/SKILL.md +1 -1
- data/.claude/skills/sm-upgrade/SKILL.md +102 -0
- data/.claude/skills/sm-upgrade/reference/upgrade-workflow.md +92 -0
- data/.claude/skills/sm-upgrade/reference/version-history.md +68 -0
- data/.vbw-planning/SHIPPED.md +35 -0
- data/.vbw-planning/config.json +24 -1
- data/.vbw-planning/discovery.json +3 -1
- data/.vbw-planning/{REQUIREMENTS.md → milestones/generator-enhancements/REQUIREMENTS.md} +22 -0
- data/.vbw-planning/milestones/generator-enhancements/ROADMAP.md +125 -0
- data/.vbw-planning/milestones/generator-enhancements/SHIPPED.md +40 -0
- data/.vbw-planning/milestones/generator-enhancements/STATE.md +43 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/01-CONTEXT.md +33 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/01-VERIFICATION.md +86 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/PLAN-01-SUMMARY.md +61 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/PLAN-01.md +380 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/02-verification/02-VERIFICATION.md +78 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/02-verification/PLAN-01-SUMMARY.md +46 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/02-verification/PLAN-01.md +500 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/03-docs-alignment/03-VERIFICATION.md +89 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/03-docs-alignment/PLAN-01-SUMMARY.md +48 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/03-docs-alignment/PLAN-01.md +456 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/04-dashboard-ux/04-VERIFICATION.md +129 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/04-dashboard-ux/PLAN-01-SUMMARY.md +70 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/04-dashboard-ux/PLAN-01.md +747 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/05-VERIFICATION.md +156 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-01-SUMMARY.md +69 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-01.md +455 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-02-SUMMARY.md +39 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-02.md +488 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/06-netflix-feed-fix/06-VERIFICATION.md +100 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/06-netflix-feed-fix/PLAN-01-SUMMARY.md +37 -0
- data/.vbw-planning/milestones/generator-enhancements/phases/06-netflix-feed-fix/PLAN-01.md +345 -0
- data/.vbw-planning/milestones/upgrade-assurance/REQUIREMENTS.md +80 -0
- data/.vbw-planning/milestones/upgrade-assurance/ROADMAP.md +75 -0
- data/.vbw-planning/milestones/upgrade-assurance/STATE.md +29 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/01-VERIFICATION.md +144 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/PLAN-01-SUMMARY.md +43 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/PLAN-01.md +405 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/02-config-deprecation/PLAN-01-SUMMARY.md +27 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/02-config-deprecation/PLAN-01.md +303 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/03-VERIFICATION.md +380 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/PLAN-01-SUMMARY.md +36 -0
- data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/PLAN-01.md +652 -0
- data/CHANGELOG.md +48 -0
- data/CLAUDE.md +5 -3
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/app/assets/builds/source_monitor/application.css +9 -0
- data/app/helpers/source_monitor/application_helper.rb +38 -0
- data/app/jobs/source_monitor/download_content_images_job.rb +72 -0
- data/app/models/source_monitor/item_content.rb +2 -0
- data/app/views/source_monitor/dashboard/_recent_activity.html.erb +9 -0
- data/app/views/source_monitor/items/_details.html.erb +2 -2
- data/app/views/source_monitor/logs/index.html.erb +9 -0
- data/app/views/source_monitor/sources/_details.html.erb +2 -2
- data/app/views/source_monitor/sources/_row.html.erb +1 -1
- data/docs/setup.md +10 -1
- data/docs/troubleshooting.md +38 -7
- data/docs/upgrade.md +140 -0
- data/lib/generators/source_monitor/install/install_generator.rb +101 -0
- data/lib/source_monitor/configuration/deprecation_registry.rb +237 -0
- data/lib/source_monitor/configuration/http_settings.rb +7 -1
- data/lib/source_monitor/configuration/images_settings.rb +37 -0
- data/lib/source_monitor/configuration.rb +11 -1
- data/lib/source_monitor/dashboard/queries/recent_activity_query.rb +16 -7
- data/lib/source_monitor/dashboard/recent_activity.rb +1 -0
- data/lib/source_monitor/dashboard/recent_activity_presenter.rb +15 -2
- data/lib/source_monitor/fetching/feed_fetcher/entry_processor.rb +13 -0
- data/lib/source_monitor/http.rb +23 -0
- data/lib/source_monitor/images/content_rewriter.rb +81 -0
- data/lib/source_monitor/images/downloader.rb +82 -0
- data/lib/source_monitor/logs/table_presenter.rb +25 -0
- data/lib/source_monitor/setup/cli.rb +7 -0
- data/lib/source_monitor/setup/procfile_patcher.rb +31 -0
- data/lib/source_monitor/setup/queue_config_patcher.rb +84 -0
- data/lib/source_monitor/setup/skills_installer.rb +1 -0
- data/lib/source_monitor/setup/upgrade_command.rb +59 -0
- data/lib/source_monitor/setup/verification/pending_migrations_verifier.rb +92 -0
- data/lib/source_monitor/setup/verification/recurring_schedule_verifier.rb +102 -0
- data/lib/source_monitor/setup/verification/runner.rb +1 -1
- data/lib/source_monitor/setup/verification/solid_queue_verifier.rb +1 -1
- data/lib/source_monitor/setup/workflow.rb +10 -0
- data/lib/source_monitor/version.rb +1 -1
- data/lib/source_monitor.rb +11 -0
- metadata +51 -2
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
---
|
|
2
|
+
phase: 3
|
|
3
|
+
plan: "01"
|
|
4
|
+
title: skills-docs-alignment
|
|
5
|
+
type: execute
|
|
6
|
+
wave: 1
|
|
7
|
+
depends_on: []
|
|
8
|
+
cross_phase_deps:
|
|
9
|
+
- phase: 1
|
|
10
|
+
artifact: "lib/generators/source_monitor/install/install_generator.rb"
|
|
11
|
+
reason: "Phase 1 added patch_procfile_dev and configure_queue_dispatcher -- docs must reflect these"
|
|
12
|
+
- phase: 2
|
|
13
|
+
artifact: "lib/source_monitor/setup/verification/recurring_schedule_verifier.rb"
|
|
14
|
+
reason: "Phase 2 added RecurringScheduleVerifier -- troubleshooting and verification docs must reference it"
|
|
15
|
+
autonomous: true
|
|
16
|
+
effort_override: thorough
|
|
17
|
+
skills_used: []
|
|
18
|
+
files_modified:
|
|
19
|
+
- .claude/skills/sm-host-setup/SKILL.md
|
|
20
|
+
- .claude/skills/sm-host-setup/reference/setup-checklist.md
|
|
21
|
+
- .claude/skills/sm-configure/SKILL.md
|
|
22
|
+
- .claude/skills/sm-job/SKILL.md
|
|
23
|
+
- docs/setup.md
|
|
24
|
+
- docs/troubleshooting.md
|
|
25
|
+
must_haves:
|
|
26
|
+
truths:
|
|
27
|
+
- "grep 'Procfile.dev' .claude/skills/sm-host-setup/SKILL.md returns matches that describe automatic patching, not manual steps"
|
|
28
|
+
- "grep 'recurring_schedule' .claude/skills/sm-host-setup/SKILL.md returns matches that describe automatic wiring, not manual configuration"
|
|
29
|
+
- "grep 'automatically' .claude/skills/sm-host-setup/reference/setup-checklist.md returns matches in the Phase 6 worker config section"
|
|
30
|
+
- "grep 'recurring_schedule' .claude/skills/sm-configure/SKILL.md returns matches referencing automatic dispatcher wiring"
|
|
31
|
+
- "grep 'automatically' docs/setup.md returns matches describing generator automation of Procfile.dev and queue.yml"
|
|
32
|
+
- "grep 'RecurringScheduleVerifier\\|recurring schedule' docs/troubleshooting.md returns matches in the recurring jobs and diagnostics sections"
|
|
33
|
+
- "The sm-host-setup SKILL.md 'What the Install Generator Does' section lists 5 actions (not 3)"
|
|
34
|
+
- "The sm-host-setup SKILL.md checklist shows Procfile.dev and dispatcher items as auto-handled (not manual checkboxes)"
|
|
35
|
+
- "The setup-checklist.md Phase 6a and 6b sections note that the generator handles these automatically"
|
|
36
|
+
- "The docs/setup.md manual installation steps 6a and 6b note that the generator handles these automatically"
|
|
37
|
+
- "The docs/troubleshooting.md Issue #4 and #5 mention running the generator as the primary fix"
|
|
38
|
+
artifacts:
|
|
39
|
+
- path: ".claude/skills/sm-host-setup/SKILL.md"
|
|
40
|
+
provides: "Updated skill reflecting 5-action generator with auto Procfile.dev and queue.yml patching"
|
|
41
|
+
contains: "Patches Procfile.dev"
|
|
42
|
+
- path: ".claude/skills/sm-host-setup/reference/setup-checklist.md"
|
|
43
|
+
provides: "Updated checklist with automated Phase 6a/6b"
|
|
44
|
+
contains: "generator handles this automatically"
|
|
45
|
+
- path: ".claude/skills/sm-configure/SKILL.md"
|
|
46
|
+
provides: "Updated configure skill referencing automatic dispatcher wiring"
|
|
47
|
+
contains: "recurring_schedule"
|
|
48
|
+
- path: "docs/setup.md"
|
|
49
|
+
provides: "Updated setup docs noting generator automation"
|
|
50
|
+
contains: "generator automatically"
|
|
51
|
+
- path: "docs/troubleshooting.md"
|
|
52
|
+
provides: "Updated troubleshooting with generator-first remediation and RecurringScheduleVerifier reference"
|
|
53
|
+
contains: "RecurringScheduleVerifier"
|
|
54
|
+
key_links:
|
|
55
|
+
- from: ".claude/skills/sm-host-setup/SKILL.md"
|
|
56
|
+
to: "REQ-21"
|
|
57
|
+
via: "sm-host-setup skill reflects new generator capabilities"
|
|
58
|
+
- from: ".claude/skills/sm-configure/SKILL.md"
|
|
59
|
+
to: "REQ-21"
|
|
60
|
+
via: "sm-configure skill references automatic recurring_schedule wiring"
|
|
61
|
+
- from: "docs/setup.md"
|
|
62
|
+
to: "REQ-21"
|
|
63
|
+
via: "Setup docs updated to note generator handles both automatically"
|
|
64
|
+
- from: "docs/troubleshooting.md"
|
|
65
|
+
to: "REQ-21"
|
|
66
|
+
via: "Troubleshooting updated with improved diagnostics"
|
|
67
|
+
- from: ".claude/skills/sm-host-setup/reference/setup-checklist.md"
|
|
68
|
+
to: "REQ-21"
|
|
69
|
+
via: "Setup checklist reflects automation"
|
|
70
|
+
---
|
|
71
|
+
<objective>
|
|
72
|
+
Update all sm-* skills and documentation files to reflect that the install generator now automatically handles Procfile.dev patching and queue.yml dispatcher wiring (added in Phase 1). Remove manual instructions that are now automated. Update troubleshooting to reference the RecurringScheduleVerifier (added in Phase 2). REQ-21.
|
|
73
|
+
</objective>
|
|
74
|
+
<context>
|
|
75
|
+
@lib/generators/source_monitor/install/install_generator.rb -- The generator now has 5 public methods executed in order: (1) add_routes_mount, (2) create_initializer, (3) configure_recurring_jobs, (4) patch_procfile_dev, (5) configure_queue_dispatcher, plus print_next_steps. The docs currently describe only 3 actions. The Procfile.dev step creates the file with web: + jobs: entries if missing, appends jobs: if present without it, or skips if already there. The queue.yml step adds recurring_schedule to dispatchers or creates a default dispatcher section.
|
|
76
|
+
|
|
77
|
+
@lib/source_monitor/setup/workflow.rb -- The guided workflow now calls procfile_patcher.patch and queue_config_patcher.patch after the install generator runs and before verification. Both patchers are unconditional (no user prompt).
|
|
78
|
+
|
|
79
|
+
@lib/source_monitor/setup/verification/recurring_schedule_verifier.rb -- New verifier (Phase 2) that checks SolidQueue recurring tasks are registered. Warns when no SM tasks found, errors when SolidQueue unavailable. Wired into Runner.default_verifiers.
|
|
80
|
+
|
|
81
|
+
@lib/source_monitor/setup/verification/solid_queue_verifier.rb -- Remediation now mentions Procfile.dev (Phase 2 change).
|
|
82
|
+
|
|
83
|
+
@.claude/skills/sm-host-setup/SKILL.md -- Lines 76-80 still have manual Procfile/queue comments in the Manual Step-by-Step section. Lines 93-109 describe only 3 generator actions. Lines 230-231 have manual checklist items.
|
|
84
|
+
|
|
85
|
+
@.claude/skills/sm-host-setup/reference/setup-checklist.md -- Phase 6a (lines 103-115) and Phase 6b (lines 115-127) describe manual Procfile.dev and recurring schedule wiring.
|
|
86
|
+
|
|
87
|
+
@.claude/skills/sm-configure/SKILL.md -- Line 149 has queue names checklist item. Needs a note about automatic recurring_schedule wiring.
|
|
88
|
+
|
|
89
|
+
@.claude/skills/sm-job/SKILL.md -- Lines 162-171 describe recurring jobs. Could mention that the generator also wires the dispatcher automatically.
|
|
90
|
+
|
|
91
|
+
@docs/setup.md -- Lines 54-67 have manual Procfile.dev and queue.yml guidance that should note the generator handles these.
|
|
92
|
+
|
|
93
|
+
@docs/troubleshooting.md -- Issues #4 (lines 23-34) and #5 (lines 36-44) should recommend re-running the generator as the primary fix and mention bin/source_monitor verify for diagnostics.
|
|
94
|
+
|
|
95
|
+
**Rationale:** Phase 1 automated Procfile.dev and queue.yml patching. Phase 2 added RecurringScheduleVerifier for diagnostics. All docs and skills still describe the pre-Phase-1 manual workflow. This plan updates every consumer-facing document to reflect the current automated behavior, eliminating confusion for new users.
|
|
96
|
+
</context>
|
|
97
|
+
<tasks>
|
|
98
|
+
<task type="auto">
|
|
99
|
+
<name>update-sm-host-setup-skill</name>
|
|
100
|
+
<files>
|
|
101
|
+
.claude/skills/sm-host-setup/SKILL.md
|
|
102
|
+
</files>
|
|
103
|
+
<action>
|
|
104
|
+
Update the sm-host-setup SKILL.md in three areas:
|
|
105
|
+
|
|
106
|
+
**1. Manual Step-by-Step section (lines 73-84):**
|
|
107
|
+
|
|
108
|
+
Replace the manual comments on lines 76-80:
|
|
109
|
+
```
|
|
110
|
+
# 5a. If your host uses bin/dev (foreman/overmind), add a jobs: entry to Procfile.dev:
|
|
111
|
+
# jobs: bundle exec rake solid_queue:start
|
|
112
|
+
|
|
113
|
+
# 5b. Ensure your dispatcher config in config/queue.yml includes
|
|
114
|
+
# recurring_schedule: config/recurring.yml so recurring jobs are loaded.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
With a note that these are now handled automatically:
|
|
118
|
+
```
|
|
119
|
+
# Note: The generator automatically patches Procfile.dev with a jobs: entry
|
|
120
|
+
# and adds recurring_schedule to your queue.yml dispatcher config.
|
|
121
|
+
# Re-run the generator if these were not applied: bin/rails generate source_monitor:install
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**2. "What the Install Generator Does" section (lines 93-109):**
|
|
125
|
+
|
|
126
|
+
Update from "performs three actions" to "performs five actions" and add items 4 and 5:
|
|
127
|
+
|
|
128
|
+
4. **Patches Procfile.dev** with a `jobs:` entry for Solid Queue:
|
|
129
|
+
Creates the file with `web:` and `jobs:` entries if it does not exist. Appends a `jobs:` entry if the file exists but lacks one. Skips if a `jobs:` entry is already present.
|
|
130
|
+
|
|
131
|
+
5. **Patches queue.yml dispatcher** with `recurring_schedule: config/recurring.yml`:
|
|
132
|
+
Adds the `recurring_schedule` key to each dispatcher entry in `config/queue.yml`. If no dispatchers section exists, creates a default one. Skips if `recurring_schedule` is already configured. Skips if `config/queue.yml` does not exist.
|
|
133
|
+
|
|
134
|
+
**3. Checklist section (lines 222-236):**
|
|
135
|
+
|
|
136
|
+
Change lines 230-231 from manual checkboxes:
|
|
137
|
+
```
|
|
138
|
+
- [ ] `Procfile.dev` includes `jobs:` entry for Solid Queue (for `bin/dev` usage)
|
|
139
|
+
- [ ] Dispatcher config includes `recurring_schedule: config/recurring.yml`
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
To auto-handled items:
|
|
143
|
+
```
|
|
144
|
+
- [x] `Procfile.dev` includes `jobs:` entry for Solid Queue (handled by generator)
|
|
145
|
+
- [x] Dispatcher config includes `recurring_schedule: config/recurring.yml` (handled by generator)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Also update the Key Source Files table to add the two new setup helpers:
|
|
149
|
+
```
|
|
150
|
+
| `lib/source_monitor/setup/procfile_patcher.rb` | Procfile.dev patching for guided workflow |
|
|
151
|
+
| `lib/source_monitor/setup/queue_config_patcher.rb` | Queue config patching for guided workflow |
|
|
152
|
+
```
|
|
153
|
+
</action>
|
|
154
|
+
<verify>
|
|
155
|
+
Read the modified file. Confirm: (a) manual comments on lines 76-80 are replaced with automation note, (b) "What the Install Generator Does" lists 5 actions, (c) checklist items for Procfile.dev and dispatcher are marked [x] with "(handled by generator)", (d) Key Source Files table includes the two new patcher files.
|
|
156
|
+
</verify>
|
|
157
|
+
<done>
|
|
158
|
+
sm-host-setup SKILL.md updated to reflect 5-action generator with automatic Procfile.dev and queue.yml handling. Manual steps replaced with automation notes. Checklist items marked as auto-handled.
|
|
159
|
+
</done>
|
|
160
|
+
</task>
|
|
161
|
+
<task type="auto">
|
|
162
|
+
<name>update-setup-checklist</name>
|
|
163
|
+
<files>
|
|
164
|
+
.claude/skills/sm-host-setup/reference/setup-checklist.md
|
|
165
|
+
</files>
|
|
166
|
+
<action>
|
|
167
|
+
Update the setup-checklist.md to reflect that Phase 6a and 6b are now automated by the generator.
|
|
168
|
+
|
|
169
|
+
**Phase 6a (lines 103-114):**
|
|
170
|
+
|
|
171
|
+
Replace the manual instruction block:
|
|
172
|
+
```
|
|
173
|
+
### Phase 6a: Wire Procfile.dev for Development
|
|
174
|
+
|
|
175
|
+
Most Rails 8 apps use `bin/dev` (via foreman or overmind) to start all processes. The host app's `Procfile.dev` must include a `jobs:` entry so Solid Queue workers start alongside the web server:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
# Procfile.dev
|
|
179
|
+
web: bin/rails server -p 3000
|
|
180
|
+
jobs: bundle exec rake solid_queue:start
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Without this line, `bin/dev` will start the web server but jobs will never process.
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
With:
|
|
187
|
+
```
|
|
188
|
+
### Phase 6a: Procfile.dev for Development (Automatic)
|
|
189
|
+
|
|
190
|
+
The install generator automatically patches `Procfile.dev` with a `jobs:` entry for Solid Queue. If no `Procfile.dev` exists, it creates one with `web:` and `jobs:` entries. If the file exists but lacks a `jobs:` entry, it appends one. This is idempotent -- re-running the generator is safe.
|
|
191
|
+
|
|
192
|
+
Verify after running the generator:
|
|
193
|
+
```
|
|
194
|
+
# Expected Procfile.dev content:
|
|
195
|
+
web: bin/rails server -p 3000
|
|
196
|
+
jobs: bundle exec rake solid_queue:start
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
If the entry is missing, re-run: `bin/rails generate source_monitor:install`
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**Phase 6b (lines 115-127):**
|
|
203
|
+
|
|
204
|
+
Replace the manual instruction block:
|
|
205
|
+
```
|
|
206
|
+
### Phase 6b: Wire Recurring Schedule into Dispatcher
|
|
207
|
+
|
|
208
|
+
The install generator creates `config/recurring.yml` with SourceMonitor's recurring jobs, but the dispatcher must explicitly reference this file. In `config/queue.yml` (or `config/solid_queue.yml`), add `recurring_schedule` to the dispatchers section:
|
|
209
|
+
|
|
210
|
+
```yaml
|
|
211
|
+
dispatchers:
|
|
212
|
+
- polling_interval: 1
|
|
213
|
+
batch_size: 500
|
|
214
|
+
recurring_schedule: config/recurring.yml
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Without this key, Solid Queue's dispatcher will not load recurring jobs even though the file exists. Sources will never auto-fetch and cleanup jobs will never fire.
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
With:
|
|
221
|
+
```
|
|
222
|
+
### Phase 6b: Recurring Schedule Dispatcher Wiring (Automatic)
|
|
223
|
+
|
|
224
|
+
The install generator automatically patches `config/queue.yml` dispatchers with `recurring_schedule: config/recurring.yml`. If no dispatchers section exists, it creates a default one. This is idempotent -- re-running the generator is safe.
|
|
225
|
+
|
|
226
|
+
Verify after running the generator:
|
|
227
|
+
```yaml
|
|
228
|
+
# Expected in config/queue.yml under dispatchers:
|
|
229
|
+
dispatchers:
|
|
230
|
+
- polling_interval: 1
|
|
231
|
+
batch_size: 500
|
|
232
|
+
recurring_schedule: config/recurring.yml
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
If the key is missing, re-run: `bin/rails generate source_monitor:install`
|
|
236
|
+
|
|
237
|
+
**Diagnostics:** Run `bin/source_monitor verify` to check that recurring tasks are registered. The RecurringScheduleVerifier will warn if no SourceMonitor recurring tasks are found in Solid Queue.
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Checklist items (lines 128-131):**
|
|
241
|
+
|
|
242
|
+
Update the checklist items to reflect automation:
|
|
243
|
+
```
|
|
244
|
+
- [x] `Procfile.dev` includes a `jobs:` entry for Solid Queue (handled by generator)
|
|
245
|
+
- [x] Dispatcher config includes `recurring_schedule: config/recurring.yml` (handled by generator)
|
|
246
|
+
```
|
|
247
|
+
</action>
|
|
248
|
+
<verify>
|
|
249
|
+
Read the modified file. Confirm: (a) Phase 6a title includes "(Automatic)", (b) Phase 6b title includes "(Automatic)", (c) both sections describe generator behavior not manual steps, (d) both include "re-run" guidance, (e) Phase 6b mentions RecurringScheduleVerifier, (f) checklist items marked [x] with "(handled by generator)".
|
|
250
|
+
</verify>
|
|
251
|
+
<done>
|
|
252
|
+
setup-checklist.md updated with automated Phase 6a/6b sections. Manual steps replaced with generator behavior descriptions and verification guidance.
|
|
253
|
+
</done>
|
|
254
|
+
</task>
|
|
255
|
+
<task type="auto">
|
|
256
|
+
<name>update-sm-configure-and-sm-job-skills</name>
|
|
257
|
+
<files>
|
|
258
|
+
.claude/skills/sm-configure/SKILL.md
|
|
259
|
+
.claude/skills/sm-job/SKILL.md
|
|
260
|
+
</files>
|
|
261
|
+
<action>
|
|
262
|
+
**sm-configure SKILL.md:**
|
|
263
|
+
|
|
264
|
+
In the Checklist section (line 149), update:
|
|
265
|
+
```
|
|
266
|
+
- [ ] Queue names match `config/solid_queue.yml` entries
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
To:
|
|
270
|
+
```
|
|
271
|
+
- [ ] Queue names match `config/queue.yml` (or `config/solid_queue.yml`) entries
|
|
272
|
+
- [x] Dispatcher config includes `recurring_schedule: config/recurring.yml` (handled by install generator)
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
This adds a new checklist item noting the automatic dispatcher wiring.
|
|
276
|
+
|
|
277
|
+
**sm-job SKILL.md:**
|
|
278
|
+
|
|
279
|
+
In the Recurring Jobs section (lines 162-171), update the text after the table:
|
|
280
|
+
```
|
|
281
|
+
These run automatically with `bin/dev` or `bin/jobs`. If you need to customize, edit `config/recurring.yml` directly.
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
To:
|
|
285
|
+
```
|
|
286
|
+
The install generator automatically configures `config/recurring.yml` with these entries AND patches the `config/queue.yml` dispatcher with `recurring_schedule: config/recurring.yml` so recurring jobs load on startup. Both steps are idempotent. If you need to customize schedules, edit `config/recurring.yml` directly.
|
|
287
|
+
```
|
|
288
|
+
</action>
|
|
289
|
+
<verify>
|
|
290
|
+
Read both modified files. Confirm: (a) sm-configure checklist has new dispatcher item marked [x], (b) sm-job recurring jobs section mentions automatic queue.yml patching.
|
|
291
|
+
</verify>
|
|
292
|
+
<done>
|
|
293
|
+
sm-configure and sm-job skills updated to reference automatic dispatcher wiring by the install generator.
|
|
294
|
+
</done>
|
|
295
|
+
</task>
|
|
296
|
+
<task type="auto">
|
|
297
|
+
<name>update-setup-docs</name>
|
|
298
|
+
<files>
|
|
299
|
+
docs/setup.md
|
|
300
|
+
</files>
|
|
301
|
+
<action>
|
|
302
|
+
Update docs/setup.md to reflect generator automation in two areas:
|
|
303
|
+
|
|
304
|
+
**1. Guided Setup section (lines 48-67):**
|
|
305
|
+
|
|
306
|
+
Replace the manual Procfile.dev and queue.yml guidance:
|
|
307
|
+
```
|
|
308
|
+
3. **Start background workers:**
|
|
309
|
+
```bash
|
|
310
|
+
bin/rails solid_queue:start
|
|
311
|
+
```
|
|
312
|
+
Recurring jobs (fetch scheduling, scraping, cleanup) are automatically configured in `config/recurring.yml` by the install generator. They'll run automatically with `bin/dev` or `bin/jobs`.
|
|
313
|
+
|
|
314
|
+
**For development with `bin/dev`:** Ensure `Procfile.dev` includes a `jobs:` entry so Solid Queue workers start alongside the web server:
|
|
315
|
+
```
|
|
316
|
+
jobs: bundle exec rake solid_queue:start
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**For recurring jobs:** Ensure the dispatcher in `config/queue.yml` (or `config/solid_queue.yml`) references the recurring schedule:
|
|
320
|
+
```yaml
|
|
321
|
+
dispatchers:
|
|
322
|
+
- polling_interval: 1
|
|
323
|
+
batch_size: 500
|
|
324
|
+
recurring_schedule: config/recurring.yml
|
|
325
|
+
```
|
|
326
|
+
Without this key, Solid Queue will not load recurring jobs even though the file exists.
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
With:
|
|
330
|
+
```
|
|
331
|
+
3. **Start background workers:**
|
|
332
|
+
```bash
|
|
333
|
+
bin/rails solid_queue:start
|
|
334
|
+
```
|
|
335
|
+
The install generator automatically handles all worker configuration:
|
|
336
|
+
- **Recurring jobs** are configured in `config/recurring.yml` (fetch scheduling, scraping, cleanup).
|
|
337
|
+
- **Procfile.dev** is patched with a `jobs:` entry so `bin/dev` starts Solid Queue alongside the web server.
|
|
338
|
+
- **Queue dispatcher** is patched with `recurring_schedule: config/recurring.yml` in `config/queue.yml` so recurring jobs load on startup.
|
|
339
|
+
|
|
340
|
+
All three steps are idempotent. If any configuration is missing, re-run: `bin/rails generate source_monitor:install`
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
**2. Manual Installation step 6a/6b (lines 104-106, 119-120):**
|
|
344
|
+
|
|
345
|
+
In the Quick Reference table, update steps 6a and 6b descriptions:
|
|
346
|
+
- Step 6a: Change "Add `jobs:` line to `Procfile.dev`" to "Handled by generator (patches `Procfile.dev`)"
|
|
347
|
+
- Step 6b: Change "Add `recurring_schedule` to dispatcher config" to "Handled by generator (patches `config/queue.yml`)"
|
|
348
|
+
|
|
349
|
+
In the step-by-step details (line 119-120), update the bullet points:
|
|
350
|
+
```
|
|
351
|
+
- **Procfile.dev:** If your host uses `bin/dev` (foreman/overmind), add a `jobs:` entry to `Procfile.dev`: `jobs: bundle exec rake solid_queue:start`. Without this, `bin/dev` will not start Solid Queue workers.
|
|
352
|
+
- **Recurring schedule:** Ensure the dispatcher in `config/queue.yml` (or `config/solid_queue.yml`) includes `recurring_schedule: config/recurring.yml`. Without this key, recurring jobs will not load even though the file exists.
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
To:
|
|
356
|
+
```
|
|
357
|
+
- **Procfile.dev:** The generator automatically patches `Procfile.dev` with a `jobs:` entry for Solid Queue. Verify the file contains `jobs: bundle exec rake solid_queue:start` after running the generator.
|
|
358
|
+
- **Recurring schedule:** The generator automatically patches `config/queue.yml` dispatchers with `recurring_schedule: config/recurring.yml`. Verify the key is present after running the generator.
|
|
359
|
+
```
|
|
360
|
+
</action>
|
|
361
|
+
<verify>
|
|
362
|
+
Read the modified file. Confirm: (a) Guided Setup section describes 3 automatic steps (recurring.yml, Procfile.dev, queue dispatcher), (b) manual steps 6a/6b reference generator automation, (c) "re-run" guidance is present, (d) no leftover manual "add this to" instructions for Procfile.dev or queue.yml.
|
|
363
|
+
</verify>
|
|
364
|
+
<done>
|
|
365
|
+
docs/setup.md updated to note the generator handles Procfile.dev and queue.yml configuration automatically in both guided and manual sections.
|
|
366
|
+
</done>
|
|
367
|
+
</task>
|
|
368
|
+
<task type="auto">
|
|
369
|
+
<name>update-troubleshooting-docs</name>
|
|
370
|
+
<files>
|
|
371
|
+
docs/troubleshooting.md
|
|
372
|
+
</files>
|
|
373
|
+
<action>
|
|
374
|
+
Update docs/troubleshooting.md issues #4 and #5 to reference generator automation and the RecurringScheduleVerifier.
|
|
375
|
+
|
|
376
|
+
**Issue #4: Recurring Jobs Not Running (lines 23-35):**
|
|
377
|
+
|
|
378
|
+
Update to mention running the generator as the primary fix and the RecurringScheduleVerifier for diagnostics:
|
|
379
|
+
|
|
380
|
+
```
|
|
381
|
+
## 4. Recurring Jobs Not Running
|
|
382
|
+
|
|
383
|
+
- **Symptoms:** Fetch scheduling, scrape scheduling, and cleanup jobs never fire. Sources never auto-fetch on their configured intervals.
|
|
384
|
+
- **Primary fix:** Re-run the install generator, which automatically patches the dispatcher config:
|
|
385
|
+
```bash
|
|
386
|
+
bin/rails generate source_monitor:install
|
|
387
|
+
```
|
|
388
|
+
- **Diagnostics:** Run `bin/source_monitor verify` to check recurring task registration. The RecurringScheduleVerifier will report whether SourceMonitor recurring tasks are loaded into Solid Queue.
|
|
389
|
+
- **Manual check:** Verify `config/queue.yml` includes `recurring_schedule: config/recurring.yml` under the `dispatchers:` section. Without this key, Solid Queue's dispatcher will not load the recurring schedule even though `config/recurring.yml` exists.
|
|
390
|
+
- **Manual fix (if generator cannot patch):**
|
|
391
|
+
```yaml
|
|
392
|
+
dispatchers:
|
|
393
|
+
- polling_interval: 1
|
|
394
|
+
batch_size: 500
|
|
395
|
+
recurring_schedule: config/recurring.yml
|
|
396
|
+
```
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
**Issue #5: Jobs Not Processing with bin/dev (lines 36-44):**
|
|
400
|
+
|
|
401
|
+
Update to mention running the generator as the primary fix:
|
|
402
|
+
|
|
403
|
+
```
|
|
404
|
+
## 5. Jobs Not Processing with bin/dev
|
|
405
|
+
|
|
406
|
+
- **Symptoms:** `bin/dev` starts the web server but jobs never run. Running `bin/rails solid_queue:start` manually works fine.
|
|
407
|
+
- **Primary fix:** Re-run the install generator, which automatically patches `Procfile.dev`:
|
|
408
|
+
```bash
|
|
409
|
+
bin/rails generate source_monitor:install
|
|
410
|
+
```
|
|
411
|
+
- **Diagnostics:** Run `bin/source_monitor verify` to check Solid Queue worker status. The SolidQueueVerifier will suggest Procfile.dev if no workers are detected.
|
|
412
|
+
- **Manual check:** Verify `Procfile.dev` includes a `jobs:` line:
|
|
413
|
+
```
|
|
414
|
+
jobs: bundle exec rake solid_queue:start
|
|
415
|
+
```
|
|
416
|
+
- Most Rails 8 apps use foreman or overmind via `bin/dev`. Without a `jobs:` entry, the process manager only starts the web server and asset watchers -- Solid Queue workers are not launched.
|
|
417
|
+
```
|
|
418
|
+
</action>
|
|
419
|
+
<verify>
|
|
420
|
+
Read the modified file. Confirm: (a) Issue #4 has "Primary fix" mentioning the generator, (b) Issue #4 mentions RecurringScheduleVerifier, (c) Issue #5 has "Primary fix" mentioning the generator, (d) Issue #5 mentions SolidQueueVerifier and Procfile.dev, (e) both issues have "Diagnostics" sections referencing `bin/source_monitor verify`, (f) manual fixes are still present as fallback.
|
|
421
|
+
</verify>
|
|
422
|
+
<done>
|
|
423
|
+
docs/troubleshooting.md updated with generator-first remediation, RecurringScheduleVerifier diagnostics, and SolidQueueVerifier Procfile.dev suggestion for issues #4 and #5.
|
|
424
|
+
</done>
|
|
425
|
+
</task>
|
|
426
|
+
</tasks>
|
|
427
|
+
<verification>
|
|
428
|
+
1. `grep -n 'performs five actions' .claude/skills/sm-host-setup/SKILL.md` returns a match
|
|
429
|
+
2. `grep -n 'Patches Procfile.dev' .claude/skills/sm-host-setup/SKILL.md` returns a match
|
|
430
|
+
3. `grep -n 'Patches queue.yml' .claude/skills/sm-host-setup/SKILL.md` returns a match
|
|
431
|
+
4. `grep -n 'handled by generator' .claude/skills/sm-host-setup/SKILL.md` returns matches for both checklist items
|
|
432
|
+
5. `grep -n 'Automatic' .claude/skills/sm-host-setup/reference/setup-checklist.md` returns matches for Phase 6a and 6b
|
|
433
|
+
6. `grep -n 'handled by generator' .claude/skills/sm-host-setup/reference/setup-checklist.md` returns matches for checklist items
|
|
434
|
+
7. `grep -n 'RecurringScheduleVerifier' .claude/skills/sm-host-setup/reference/setup-checklist.md` returns a match
|
|
435
|
+
8. `grep -n 'recurring_schedule' .claude/skills/sm-configure/SKILL.md` returns a match in the checklist
|
|
436
|
+
9. `grep -n 'patches.*queue.yml' .claude/skills/sm-job/SKILL.md` returns a match in the recurring jobs section
|
|
437
|
+
10. `grep -n 'generator automatically' docs/setup.md` returns matches in both guided and manual sections
|
|
438
|
+
11. `grep -n 'RecurringScheduleVerifier' docs/troubleshooting.md` returns a match in Issue #4
|
|
439
|
+
12. `grep -n 'Primary fix' docs/troubleshooting.md` returns matches in Issues #4 and #5
|
|
440
|
+
13. No manual "add a jobs: entry to Procfile.dev" instructions remain in any updated file (verified by grep absence)
|
|
441
|
+
</verification>
|
|
442
|
+
<success_criteria>
|
|
443
|
+
- sm-host-setup SKILL.md describes 5 generator actions including Procfile.dev and queue.yml patching (REQ-21)
|
|
444
|
+
- sm-host-setup SKILL.md checklist marks Procfile.dev and dispatcher items as auto-handled (REQ-21)
|
|
445
|
+
- setup-checklist.md Phase 6a/6b describe generator automation, not manual steps (REQ-21)
|
|
446
|
+
- setup-checklist.md references RecurringScheduleVerifier for diagnostics (REQ-21)
|
|
447
|
+
- sm-configure SKILL.md checklist references automatic recurring_schedule wiring (REQ-21)
|
|
448
|
+
- sm-job SKILL.md recurring jobs section mentions automatic queue.yml patching (REQ-21)
|
|
449
|
+
- docs/setup.md guided and manual sections note generator handles Procfile.dev and queue.yml (REQ-21)
|
|
450
|
+
- docs/troubleshooting.md Issue #4 recommends generator as primary fix and mentions RecurringScheduleVerifier (REQ-21)
|
|
451
|
+
- docs/troubleshooting.md Issue #5 recommends generator as primary fix and mentions SolidQueueVerifier (REQ-21)
|
|
452
|
+
- All manual "add this to your file" instructions replaced with "generator handles this" + verification guidance (REQ-21)
|
|
453
|
+
</success_criteria>
|
|
454
|
+
<output>
|
|
455
|
+
.vbw-planning/phases/03-docs-alignment/PLAN-01-SUMMARY.md
|
|
456
|
+
</output>
|
data/.vbw-planning/milestones/generator-enhancements/phases/04-dashboard-ux/04-VERIFICATION.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
phase: 4
|
|
3
|
+
tier: standard
|
|
4
|
+
result: PASS
|
|
5
|
+
passed: 23
|
|
6
|
+
failed: 0
|
|
7
|
+
total: 23
|
|
8
|
+
date: 2026-02-12
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Must-Have Checks
|
|
12
|
+
|
|
13
|
+
| # | Truth/Condition | Status | Evidence |
|
|
14
|
+
|---|-----------------|--------|----------|
|
|
15
|
+
| 1 | Run `PARALLEL_WORKERS=1 bin/rails test test/lib/source_monitor/dashboard/recent_activity_presenter_test.rb` exits 0 with 0 failures | PASS | 6 runs, 14 assertions, 0 failures, 0 errors, 0 skips |
|
|
16
|
+
| 2 | Run `PARALLEL_WORKERS=1 bin/rails test test/lib/source_monitor/logs/table_presenter_test.rb` exits 0 with 0 failures | PASS | 1 runs, 51 assertions, 0 failures, 0 errors, 0 skips |
|
|
17
|
+
| 3 | Run `bin/rails test` exits 0 with 874+ runs and 0 failures | PASS | 885 runs, 2957 assertions, 0 failures, 0 errors, 0 skips |
|
|
18
|
+
| 4 | Run `bin/rubocop` exits 0 with 0 offenses | PASS | 381 files inspected, 0 offenses (after auto-fix of Active Storage migration) |
|
|
19
|
+
|
|
20
|
+
## Artifact Checks
|
|
21
|
+
|
|
22
|
+
| Artifact | Exists | Contains | Status |
|
|
23
|
+
|----------|--------|----------|--------|
|
|
24
|
+
| lib/source_monitor/dashboard/recent_activity.rb | YES | source_feed_url | PASS |
|
|
25
|
+
| lib/source_monitor/dashboard/recent_activity_presenter.rb | YES | source_domain | PASS |
|
|
26
|
+
| lib/source_monitor/dashboard/queries/recent_activity_query.rb | YES | feed_url | PASS |
|
|
27
|
+
| lib/source_monitor/logs/table_presenter.rb | YES | url_label | PASS |
|
|
28
|
+
| app/helpers/source_monitor/application_helper.rb | YES | external_link_to | PASS |
|
|
29
|
+
| app/views/source_monitor/dashboard/_recent_activity.html.erb | YES | url_display | PASS |
|
|
30
|
+
| app/views/source_monitor/sources/_row.html.erb | YES | external_link_to | PASS |
|
|
31
|
+
| app/views/source_monitor/sources/_details.html.erb | YES | external_link_to | PASS |
|
|
32
|
+
| app/views/source_monitor/items/_details.html.erb | YES | external_link_to | PASS |
|
|
33
|
+
|
|
34
|
+
## Key Link Checks
|
|
35
|
+
|
|
36
|
+
| From | To | Via | Status |
|
|
37
|
+
|------|----|----|--------|
|
|
38
|
+
| recent_activity_query.rb#fetch_log_sql | REQ-22 | JOIN sources to pull feed_url (line 90), displayed as domain on dashboard | PASS |
|
|
39
|
+
| recent_activity_query.rb#scrape_log_sql | REQ-22 | JOIN items to pull item url (line 108), displayed on dashboard | PASS |
|
|
40
|
+
| application_helper.rb#external_link_to | REQ-23 | All external URLs use this helper for target=_blank + external-link icon (line 217) | PASS |
|
|
41
|
+
| sources/_row.html.erb | REQ-23 | Feed URL in source index row is clickable (line 32) | PASS |
|
|
42
|
+
| sources/_details.html.erb | REQ-23 | Website URL and feed URL on source detail page are clickable (lines 28, 140) | PASS |
|
|
43
|
+
| items/_details.html.erb | REQ-23 | Item URL and canonical URL are clickable (lines 56-57) | PASS |
|
|
44
|
+
|
|
45
|
+
## Convention Compliance
|
|
46
|
+
|
|
47
|
+
| Convention | File | Status | Detail |
|
|
48
|
+
|------------|------|--------|--------|
|
|
49
|
+
| frozen_string_literal | All modified .rb files | PASS | All files have frozen_string_literal pragma |
|
|
50
|
+
| Test coverage | Helper tests | PASS | 7 new tests for external_link_to and domain_from_url |
|
|
51
|
+
| Test coverage | Presenter tests | PASS | 4 new tests for url_display in fetch/scrape events |
|
|
52
|
+
| Test coverage | Table presenter tests | PASS | 6 new assertions for url_label/url_href |
|
|
53
|
+
| RuboCop omakase | All modified files | PASS | 0 offenses after auto-fix |
|
|
54
|
+
| Rails conventions | Helper methods | PASS | external_link_to follows Rails helper patterns, returns html_safe |
|
|
55
|
+
| Rails conventions | Query objects | PASS | SQL JOINs use LEFT JOIN, proper table name quoting |
|
|
56
|
+
| Rails conventions | View partials | PASS | Use helper methods, maintain existing layout structure |
|
|
57
|
+
|
|
58
|
+
## Anti-Pattern Scan
|
|
59
|
+
|
|
60
|
+
| Pattern | Found | Location | Severity |
|
|
61
|
+
|---------|-------|----------|----------|
|
|
62
|
+
| TODO/FIXME/HACK/XXX | YES | app/controllers/source_monitor/items_controller.rb:39 | INFO |
|
|
63
|
+
| Hard-coded strings | NO | N/A | N/A |
|
|
64
|
+
| Missing nil checks | NO | All helpers check for blank URLs | N/A |
|
|
65
|
+
| Unsafe HTML rendering | NO | link_to returns html_safe | N/A |
|
|
66
|
+
| N+1 queries | NO | Query uses JOINs, not lazy loading | N/A |
|
|
67
|
+
|
|
68
|
+
**Note:** The TODO in items_controller.rb is pre-existing (extract ItemScrapesController), not related to Phase 4.
|
|
69
|
+
|
|
70
|
+
## Requirement Mapping
|
|
71
|
+
|
|
72
|
+
| Requirement | Plan Ref | Artifact Evidence | Status |
|
|
73
|
+
|-------------|----------|-------------------|--------|
|
|
74
|
+
| REQ-22: Fetch logs show source URL on dashboard | PLAN-01 Task 2, 3, 4 | recent_activity_query.rb JOINs sources (line 90), presenter extracts domain (line 33), view displays url_display (line 24-30) | PASS |
|
|
75
|
+
| REQ-22: Scrape logs show item URL on dashboard | PLAN-01 Task 2, 3, 4 | recent_activity_query.rb JOINs items (line 108), presenter passes item_url (line 372), view displays url_display (line 24-30) | PASS |
|
|
76
|
+
| REQ-22: Both success and failure show URLs | PLAN-01 Task 2 | Tests verify failure events include url_display (recent_activity_presenter_test.rb line 436-455) | PASS |
|
|
77
|
+
| REQ-22: Logs table shows URL info | PLAN-01 Task 3 | table_presenter.rb url_label method (line 64), logs/index.html.erb displays below subject | PASS |
|
|
78
|
+
| REQ-23: external_link_to helper with target=_blank | PLAN-01 Task 1 | application_helper.rb line 217-224, includes target="_blank", rel="noopener noreferrer" | PASS |
|
|
79
|
+
| REQ-23: Feed URLs clickable in source index | PLAN-01 Task 5 | sources/_row.html.erb line 32 uses external_link_to | PASS |
|
|
80
|
+
| REQ-23: Website/Feed URLs clickable in source detail | PLAN-01 Task 5 | sources/_details.html.erb lines 28, 140 use external_link_to | PASS |
|
|
81
|
+
| REQ-23: Item URLs clickable in item detail | PLAN-01 Task 5 | items/_details.html.erb lines 56-57 use external_link_to | PASS |
|
|
82
|
+
|
|
83
|
+
## Summary
|
|
84
|
+
|
|
85
|
+
**Tier:** standard
|
|
86
|
+
|
|
87
|
+
**Result:** PASS
|
|
88
|
+
|
|
89
|
+
**Passed:** 23/23
|
|
90
|
+
|
|
91
|
+
**Failed:** None
|
|
92
|
+
|
|
93
|
+
### Verification Details
|
|
94
|
+
|
|
95
|
+
Phase 4 (Dashboard UX Improvements) has been fully executed according to PLAN-01 specifications:
|
|
96
|
+
|
|
97
|
+
1. **Helper Layer (Task 1):** `external_link_to` helper added with target="_blank", rel="noopener noreferrer", and external-link SVG icon. `domain_from_url` helper extracts hostnames from URLs. Both handle nil/blank inputs gracefully. 7 comprehensive tests cover all edge cases.
|
|
98
|
+
|
|
99
|
+
2. **Data Layer (Task 2):** `recent_activity_query.rb` now JOINs sources table for fetch logs (pulling feed_url) and items table for scrape logs (pulling item url). Event struct extended with `source_feed_url` field. Presenter extracts domain for fetch events and passes through item URL for scrape events. Both success and failure events include URL info. 4 new tests verify all scenarios.
|
|
100
|
+
|
|
101
|
+
3. **Logs Table (Task 3):** `table_presenter.rb` Row class adds `url_label` (domain for fetches, full URL for scrapes) and `url_href` methods. Health check rows return nil. 6 assertions added to existing comprehensive test.
|
|
102
|
+
|
|
103
|
+
4. **View Layer (Task 4):** Dashboard `_recent_activity.html.erb` displays URL below event description. Logs `index.html.erb` displays URL below subject column. Both use `external_link_to` for clickable links with consistent muted styling.
|
|
104
|
+
|
|
105
|
+
5. **Clickable URLs (Task 5):** All external URLs across source index rows, source detail page (feed URL, website URL), and item detail page (URL, canonical URL) are now clickable with new-tab behavior.
|
|
106
|
+
|
|
107
|
+
### Test Results
|
|
108
|
+
|
|
109
|
+
- Test suite: **885 runs, 2957 assertions, 0 failures**
|
|
110
|
+
- RuboCop: **381 files inspected, 0 offenses**
|
|
111
|
+
- Coverage: All new functionality covered by tests
|
|
112
|
+
|
|
113
|
+
### Requirements Satisfied
|
|
114
|
+
|
|
115
|
+
- **REQ-22:** Fetch logs show source domain; scrape logs show item URL; both success and failure events display URL info; logs table shows URL below subject column
|
|
116
|
+
- **REQ-23:** All external URLs are clickable links opening in new tabs with external-link icon indicator
|
|
117
|
+
|
|
118
|
+
### Commits Verified
|
|
119
|
+
|
|
120
|
+
All 5 commits referenced in PLAN-01-SUMMARY.md are present:
|
|
121
|
+
- 6fde387: Add external_link_to and domain_from_url helpers
|
|
122
|
+
- 527bea1: Add URL info to recent activity query and presenter
|
|
123
|
+
- cd6041e: Add url_label and url_href to logs table presenter
|
|
124
|
+
- 5376b03: Show URL info in dashboard and logs views
|
|
125
|
+
- 51db3c6: Make external URLs clickable across views
|
|
126
|
+
|
|
127
|
+
### Deviations
|
|
128
|
+
|
|
129
|
+
None. All tasks executed as specified in PLAN-01. No requirements gaps, no anti-patterns introduced, full test coverage achieved.
|
data/.vbw-planning/milestones/generator-enhancements/phases/04-dashboard-ux/PLAN-01-SUMMARY.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# PLAN-01 Summary: dashboard-url-display-and-clickable-links
|
|
2
|
+
|
|
3
|
+
## Status: COMPLETE
|
|
4
|
+
|
|
5
|
+
## What Was Built
|
|
6
|
+
|
|
7
|
+
### Task 1: Add external_link_to helper and tests
|
|
8
|
+
- Added `external_link_to(label, url, **options)` public helper: renders `<a>` with `target="_blank"`, `rel="noopener noreferrer"`, and external-link SVG icon; returns plain label when URL is blank
|
|
9
|
+
- Added `domain_from_url(url)` public helper: extracts hostname via `URI.parse`, returns nil for blank/invalid URLs
|
|
10
|
+
- Added `external_link_icon` private helper: renders Heroicon external-link SVG with consistent Tailwind styling
|
|
11
|
+
- 7 new tests covering link rendering, nil/blank handling, custom CSS class, domain extraction, and invalid URL
|
|
12
|
+
|
|
13
|
+
### Task 2: Add URL info to recent activity query and presenter
|
|
14
|
+
- Added `:source_feed_url` field to `Dashboard::RecentActivity::Event` struct
|
|
15
|
+
- Updated `fetch_log_sql` to JOIN `sources` table and SELECT `feed_url AS source_feed_url`
|
|
16
|
+
- Updated `scrape_log_sql` to JOIN `items` table and SELECT `items.url AS item_url`
|
|
17
|
+
- Added `NULL AS source_feed_url` to `scrape_log_sql` and `item_sql` for UNION column alignment
|
|
18
|
+
- Updated `build_event` to pass `source_feed_url` from query results
|
|
19
|
+
- Added `url_display` (domain for fetches, full URL for scrapes) and `url_href` keys to presenter view models
|
|
20
|
+
- Added `source_domain` private method for domain extraction
|
|
21
|
+
- 4 new tests: fetch with domain, fetch with nil URL, failure with URL, scrape with item URL
|
|
22
|
+
|
|
23
|
+
### Task 3: Add URL to logs table presenter
|
|
24
|
+
- Added `url_label` public method: returns domain for fetch rows, item URL for scrape rows, nil for health checks
|
|
25
|
+
- Added `url_href` public method: returns full feed_url for fetches, item URL for scrapes, nil for health checks
|
|
26
|
+
- Added `domain_from_feed_url` private helper with URI parsing
|
|
27
|
+
- 6 new assertions for fetch, scrape, and health check row types
|
|
28
|
+
|
|
29
|
+
### Task 4: Update dashboard and logs views with URL display
|
|
30
|
+
- Dashboard `_recent_activity.html.erb`: added URL display line below event description, using `external_link_to` for clickable links
|
|
31
|
+
- Logs `index.html.erb`: added URL display below subject column in table rows, using `external_link_to` for clickable links
|
|
32
|
+
- Both use muted `text-slate-400` styling with `hover:text-blue-500` for visual consistency
|
|
33
|
+
|
|
34
|
+
### Task 5: Make external URLs clickable across views
|
|
35
|
+
- `sources/_row.html.erb`: feed_url in source index row is now a clickable external link
|
|
36
|
+
- `sources/_details.html.erb`: Feed URL header and Website URL in details hash are clickable external links
|
|
37
|
+
- `items/_details.html.erb`: URL and Canonical URL in details hash are clickable external links
|
|
38
|
+
|
|
39
|
+
## Files Modified
|
|
40
|
+
- `app/helpers/source_monitor/application_helper.rb` (external_link_to, domain_from_url, external_link_icon)
|
|
41
|
+
- `lib/source_monitor/dashboard/recent_activity.rb` (source_feed_url field)
|
|
42
|
+
- `lib/source_monitor/dashboard/queries/recent_activity_query.rb` (JOIN sources/items, source_feed_url column)
|
|
43
|
+
- `lib/source_monitor/dashboard/recent_activity_presenter.rb` (url_display, url_href, source_domain)
|
|
44
|
+
- `lib/source_monitor/logs/table_presenter.rb` (url_label, url_href, domain_from_feed_url)
|
|
45
|
+
- `app/views/source_monitor/dashboard/_recent_activity.html.erb` (URL display below description)
|
|
46
|
+
- `app/views/source_monitor/logs/index.html.erb` (URL display below subject)
|
|
47
|
+
- `app/views/source_monitor/sources/_row.html.erb` (clickable feed_url)
|
|
48
|
+
- `app/views/source_monitor/sources/_details.html.erb` (clickable feed URL, website URL)
|
|
49
|
+
- `app/views/source_monitor/items/_details.html.erb` (clickable URL, canonical URL)
|
|
50
|
+
- `test/helpers/source_monitor/application_helper_test.rb` (7 new tests)
|
|
51
|
+
- `test/lib/source_monitor/dashboard/recent_activity_presenter_test.rb` (4 new tests)
|
|
52
|
+
- `test/lib/source_monitor/logs/table_presenter_test.rb` (6 new assertions)
|
|
53
|
+
|
|
54
|
+
## Commits
|
|
55
|
+
- `6fde387` feat(04-dashboard-ux): add external_link_to and domain_from_url helpers
|
|
56
|
+
- `527bea1` feat(04-dashboard-ux): add URL info to recent activity query and presenter
|
|
57
|
+
- `cd6041e` feat(04-dashboard-ux): add url_label and url_href to logs table presenter
|
|
58
|
+
- `5376b03` feat(04-dashboard-ux): show URL info in dashboard and logs views
|
|
59
|
+
- `51db3c6` feat(04-dashboard-ux): make external URLs clickable across views
|
|
60
|
+
|
|
61
|
+
## Requirements Satisfied
|
|
62
|
+
- REQ-22: Fetch log events display source domain; scrape log events display item URL; both success and failure events show URL info; logs table shows URL below subject column
|
|
63
|
+
- REQ-23: All external URLs (feed URLs, website URLs, item URLs, canonical URLs) are clickable links opening in new tabs with external-link icon indicator
|
|
64
|
+
|
|
65
|
+
## Verification Results
|
|
66
|
+
- `bin/rails test`: 885 runs, 2957 assertions, 0 failures, 0 errors
|
|
67
|
+
- `bin/rubocop`: 378 files inspected, 0 offenses
|
|
68
|
+
|
|
69
|
+
## Deviations
|
|
70
|
+
None. All tasks executed as specified in the plan.
|