You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document contains technical details about the Simple Coding Time Tracker VS Code extension, including development setup, release processes, and internal architecture.
-**Health Notifications**: Eye rest (20-20-20), stretch, break reminders with snooze
136
+
-**Status Bar**: Real-time display, tooltips, click to open summary
154
137
155
138
### Git Branch Tracking
156
139
@@ -179,173 +162,37 @@ The extension uses the `simple-git` library to monitor git branch changes and as
179
162
4. StatusBar updates in real-time
180
163
5. SummaryView queries the Database for visualization
181
164
182
-
### Configuration Options
183
-
184
-
The extension supports several configuration options in `package.json`:
185
-
186
-
```json
187
-
{
188
-
"simpleCodingTimeTracker.saveInterval": {
189
-
"type": "number",
190
-
"default": 5,
191
-
"description": "Interval in seconds to save the current coding session"
192
-
},
193
-
"simpleCodingTimeTracker.inactivityTimeout": {
194
-
"type": "number",
195
-
"default": 300,
196
-
"description": "Time in seconds of inactivity before tracking stops"
197
-
}
198
-
}
199
-
```
165
+
### Configuration
166
+
167
+
**Key Settings:**
168
+
-`inactivityTimeout`: 2.5 min (pause on inactivity)
169
+
-`focusTimeout`: 3 min (continue after focus loss)
170
+
- Health notifications: eye rest (20m), stretch (30m), breaks (90m)
171
+
-`enableDevCommands`: false (test data generation)
172
+
173
+
**Access:** Settings button in summary view OR VS Code settings
200
174
201
175
## Contributing
202
176
203
177
For detailed contribution guidelines, please see [CONTRIBUTING.md](CONTRIBUTING.md).
204
178
205
179
## Testing
206
180
207
-
### Generate Test Data
208
-
209
-
The extension includes built-in commands to generate comprehensive test data for development and testing purposes. These commands are hidden from end users by default and only available when explicitly enabled.
210
-
211
-
#### Enabling Test Data Commands
212
-
213
-
**Method 1: Via Settings UI**
214
-
1. Open VS Code Settings (`Ctrl+,`)
215
-
2. Search for `"enableDevCommands"`
216
-
3. Check the box for "Simple Coding Time Tracker › Enable Dev Commands"
217
-
218
-
**Method 2: Via settings.json**
219
-
```json
220
-
{
221
-
"simpleCodingTimeTracker.enableDevCommands": true
222
-
}
223
-
```
224
-
225
-
#### Available Test Commands
226
-
227
-
Once enabled, the following commands become available in the Command Palette (`Ctrl+Shift+P`):
228
-
229
-
**`SCTT: Generate Test Data (Dev)`**
230
-
- Creates comprehensive test data for the last 90 days
231
-
- Generates 150-200 realistic time entries
232
-
- Includes 10 different projects, 12 Git branches, and 20 programming languages
233
-
- Session durations range from 15 minutes to 3 hours
234
-
- Automatically skips some days to simulate realistic patterns
235
-
236
-
**`SCTT: Delete Test Data (Dev)`**
237
-
- Safely removes ALL time tracking data with confirmation prompts
238
-
- Requires typing "DELETE ALL DATA" for safety
239
-
- Cannot be undone - use with caution
240
-
241
-
#### Test Data Structure
242
-
243
-
Generated test data includes:
244
-
```javascript
245
-
{
246
-
date:"2025-08-30", // ISO date string
247
-
project:"React Dashboard", // Random project name
248
-
timeSpent:120, // Minutes (15-180 range)
249
-
branch:"feature/dashboard", // Git branch name
250
-
language:"typescript"// Programming language
251
-
}
252
-
```
253
-
254
-
#### Security Features
255
-
256
-
-**Hidden by default**: Commands don't appear for end users
257
-
-**Configuration controlled**: Only visible when setting is enabled
258
-
-**Development mode fallback**: Always available in extension development
259
-
-**Clear labeling**: Commands marked with "(Dev)" suffix
260
-
-**Warning messages**: Shows helpful errors if commands are disabled
261
-
262
-
#### Testing Workflow
263
-
264
-
1.**Package your extension**: `npm run package`
265
-
2.**Install the package**: `code --install-extension your-package.vsix`
266
-
3.**Enable dev commands**: Set `enableDevCommands` to `true` in settings
267
-
4.**Generate test data**: Use `SCTT: Generate Test Data (Dev)` command
6.**Clean up**: Use `SCTT: Delete Test Data (Dev)` to remove test data
270
-
7.**Disable dev commands**: Set `enableDevCommands` to `false`
271
-
272
-
This approach ensures test data generation works correctly with packaged extensions while keeping the functionality completely hidden from end users.
273
-
274
-
### Marketplace Publishing Tests
275
-
276
-
The extension uses a consolidated workflow with granular control for testing each marketplace individually. You can test publishing to specific marketplaces without affecting production.
277
-
278
-
#### Test Only Open VSX Registry
279
-
280
-
```bash
281
-
# Using GitHub CLI
282
-
gh workflow run build-and-publish.yml \
283
-
--field publish_vscode=false \
284
-
--field publish_openvsx=true \
285
-
--field force_publish=true
286
-
287
-
# Or via GitHub UI:
288
-
# Actions → "Build and Publish Extension" → Run workflow
289
-
# ❌ Uncheck "Publish to VS Code Marketplace"
290
-
# ✅ Check "Publish to Open VSX Registry"
291
-
# ✅ Check "Force publish" (if no version change)
292
-
```
293
-
294
-
#### Test Only VS Code Marketplace
295
-
296
-
```bash
297
-
# Using GitHub CLI
298
-
gh workflow run build-and-publish.yml \
299
-
--field publish_vscode=true \
300
-
--field publish_openvsx=false \
301
-
--field force_publish=true
302
-
303
-
# Or via GitHub UI:
304
-
# Actions → "Build and Publish Extension" → Run workflow
305
-
# ✅ Check "Publish to VS Code Marketplace"
306
-
# ❌ Uncheck "Publish to Open VSX Registry"
307
-
# ✅ Check "Force publish" (if no version change)
308
-
```
309
-
310
-
#### Test Both Marketplaces (Default)
311
-
312
-
```bash
313
-
# Using GitHub CLI
314
-
gh workflow run build-and-publish.yml \
315
-
--field publish_vscode=true \
316
-
--field publish_openvsx=true \
317
-
--field force_publish=true
318
-
319
-
# Or via GitHub UI:
320
-
# Actions → "Build and Publish Extension" → Run workflow
321
-
# ✅ Check "Publish to VS Code Marketplace"
322
-
# ✅ Check "Publish to Open VSX Registry"
323
-
# ✅ Check "Force publish" (if testing without version change)
324
-
```
325
-
326
-
#### Workflow Input Parameters
327
-
328
-
| Parameter | Description | Default | Use Case |
329
-
|-----------|-------------|---------|----------|
330
-
|`publish_vscode`| Publish to VS Code Marketplace |`true`| Test VS Code publishing |
331
-
|`publish_openvsx`| Publish to Open VSX Registry |`true`| Test Open VSX publishing |
332
-
|`force_publish`| Force publish (ignore version change check) |`false`| Testing without version bump |
181
+
### Dev Commands
182
+
Enable `enableDevCommands` → `SCTT: Generate Test Data (Dev)` creates 90 days of realistic data
333
183
334
-
#### Testing Notes
184
+
### Manual Testing
185
+
F5 launches Extension Development Host for testing core features
335
186
336
-
-**Force Publish**: Use when testing without bumping the version in `package.json`
337
-
-**Individual Testing**: Disable one marketplace to test the other in isolation
338
-
-**Status Report**: The workflow provides detailed status for each marketplace
339
-
-**Artifacts**: VSIX files are stored as artifacts for 90 days for rollback capability
187
+
## GitHub Pages Website
340
188
341
-
### Manual Testing Checklist
189
+
Site: https://twentytwo.github.io/vsc-ext-coding-time-tracker/ (on `site` branch)
0 commit comments