Skip to content

Commit 858f530

Browse files
committed
docs: update technical documentation with current status and branch management details
1 parent b76737a commit 858f530

1 file changed

Lines changed: 51 additions & 204 deletions

File tree

TECHNICAL.md

Lines changed: 51 additions & 204 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This document contains technical details about the Simple Coding Time Tracker VS Code extension, including development setup, release processes, and internal architecture.
44

5+
## Current Status
6+
7+
**Version**: 0.6.3 | **Marketplaces**: [VS Code](https://marketplace.visualstudio.com/items?itemName=noorashuvo.simple-coding-time-tracker) | [Open VSX](https://open-vsx.org/extension/noorashuvo/simple-coding-time-tracker) | **Website**: [GitHub Pages](https://twentytwo.github.io/vsc-ext-coding-time-tracker/)
8+
59
## Development Setup
610

711
### Prerequisites
@@ -13,20 +17,28 @@ This document contains technical details about the Simple Coding Time Tracker VS
1317
```
1418
vsc-ext-coding-time-tracker/
1519
├── src/ # Source code
16-
│ ├── extension.ts # Main extension file
17-
│ ├── statusBar.ts # Status bar functionality
18-
│ ├── summaryView.ts # Summary view implementation
19-
│ ├── timeTracker.ts # Time tracking logic
20-
│ ├── database.ts # Database operations
21-
│ └── utils.ts # Utility functions
22-
├── scripts/ # Development scripts
23-
│ └── generate-test-data.js # Test data generation
24-
├── .github/workflows/ # GitHub Actions workflows
25-
│ ├── release.yml # Release automation
26-
│ └── publish.yml # Marketplace publishing
27-
└── images/ # Documentation images
20+
│ ├── extension.ts # Main entry point
21+
│ ├── timeTracker.ts # Core tracking logic
22+
│ ├── database.ts # Data persistence
23+
│ ├── summaryView.ts # Charts & visualization
24+
│ ├── healthNotifications.ts # Health reminders
25+
│ └── [other components] # statusBar, settingsView, logger, utils
26+
├── docs/ # Website (on site branch)
27+
├── .github/workflows/ # CI/CD pipelines
28+
└── package.json # Extension configuration
2829
```
2930

31+
## Branch Management
32+
33+
The repository uses a multi-branch strategy for organized development and deployment:
34+
35+
| Branch | Purpose | Deployment |
36+
|--------|---------|------------|
37+
| `main` | Production releases | VS Code Marketplace, Open VSX |
38+
| `develop` | Beta releases & testing | Pre-release testing |
39+
| `site` | GitHub Pages website | https://twentytwo.github.io/vsc-ext-coding-time-tracker/ |
40+
| `stats-data` | Repository statistics | Data storage only |
41+
3042
## Release Process
3143

3244
The extension uses GitHub Actions to automate the release process. There are two types of releases supported:
@@ -117,40 +129,11 @@ The release process is defined in two GitHub Actions workflow files:
117129

118130
### Core Components
119131

120-
1. **Extension Entry Point (`extension.ts`)**
121-
- Activates the extension
122-
- Initializes core components
123-
- Registers VS Code commands
124-
- Handles workspace events
125-
126-
2. **Time Tracker (`timeTracker.ts`)**
127-
- Core time tracking logic
128-
- Activity detection
129-
- Session management
130-
- Project identification
131-
132-
3. **Database (`database.ts`)**
133-
- Data persistence layer
134-
- Time entry storage
135-
- Summary data generation
136-
- Search functionality
137-
138-
4. **Status Bar (`statusBar.ts`)**
139-
- Real-time time display
140-
- Activity status indication
141-
- Quick access to commands
142-
- Tooltip information
143-
144-
5. **Summary View (`summaryView.ts`)**
145-
- Interactive data visualization
146-
- Chart rendering
147-
- Search and filtering
148-
- Data export
149-
150-
6. **Utilities (`utils.ts`)**
151-
- Time formatting
152-
- Data processing
153-
- Helper functions
132+
- **Time Tracker**: Activity detection, inactivity/focus timeouts, Git branch tracking, 50+ language support
133+
- **Database**: Local storage, CRUD operations, filtering, export
134+
- **Summary View**: Interactive charts (project, timeline, heatmap, languages), theme-aware
135+
- **Health Notifications**: Eye rest (20-20-20), stretch, break reminders with snooze
136+
- **Status Bar**: Real-time display, tooltips, click to open summary
154137

155138
### Git Branch Tracking
156139

@@ -179,173 +162,37 @@ The extension uses the `simple-git` library to monitor git branch changes and as
179162
4. StatusBar updates in real-time
180163
5. SummaryView queries the Database for visualization
181164

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
200174

201175
## Contributing
202176

203177
For detailed contribution guidelines, please see [CONTRIBUTING.md](CONTRIBUTING.md).
204178

205179
## Testing
206180

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
268-
5. **Test extension features**: Verify charts, filtering, search functionality
269-
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
333183

334-
#### Testing Notes
184+
### Manual Testing
185+
F5 launches Extension Development Host for testing core features
335186

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
340188

341-
### Manual Testing Checklist
189+
Site: https://twentytwo.github.io/vsc-ext-coding-time-tracker/ (on `site` branch)
190+
See [WEBSITE.md](WEBSITE.md) for maintenance
342191

343-
Before submitting a pull request:
192+
## Documentation References
344193

345-
1. Verify time tracking starts/stops correctly
346-
2. Check status bar updates
347-
3. Test inactivity detection
348-
4. Validate data persistence
349-
5. Check summary view visualizations
350-
6. Test search and filtering
351-
7. Verify theme compatibility
194+
- **Branch Management**: [BRANCHES.md](BRANCHES.md) - Complete branch workflow guide
195+
- **Website Maintenance**: [WEBSITE.md](WEBSITE.md) - Detailed website documentation
196+
- **GitHub Pages Setup**: [GITHUB_PAGES_SETUP.md](GITHUB_PAGES_SETUP.md) - Initial deployment guide
197+
- **Contributing Guidelines**: [CONTRIBUTING.md](CONTRIBUTING.md) - How to contribute to the project
198+
- **User Documentation**: Available on the [GitHub Pages site](https://twentytwo.github.io/vsc-ext-coding-time-tracker/documentation.html)

0 commit comments

Comments
 (0)