Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@ import { defineConfig } from '@vscode/test-cli';

export default defineConfig({
files: 'out/test/**/*.test.js',
// Test against minimum supported version (1.84.0) to ensure backward compatibility
// This ensures the extension works for users with older VS Code versions
version: '1.84.0'
});

// Note: To test against the latest VS Code version, run:
// VSCODE_VERSION=stable pnpm test
// Or create a separate configuration in .vscode/launch.json

21 changes: 20 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}",
"preLaunchTask": "compile",
"settings": {
"pastepad.logLevel": "debug"
}
Expand All @@ -37,6 +37,25 @@
"settings": {
"pastepad.logLevel": "debug"
}
},
{
"name": "Extension Tests (Min VS Code 1.84)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test",
"--version=1.84.0"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}",
"settings": {
"pastepad.logLevel": "debug"
}
}
]
}
38 changes: 24 additions & 14 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,34 @@
"version": "2.0.0",
"tasks": [
{
"label": "watch",
"dependsOn": [
"npm: watch:tsc",
"npm: watch:esbuild"
],
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
},
"label": "npm: watch",
"dependsOn": [
"npm: watch:tsc",
"npm: watch:esbuild"
],
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "compile",
"type": "npm",
"script": "compile",
"group": "build",
"problemMatcher": [],
"presentation": {
"reveal": "always"
}
},
{
"type": "npm",
"script": "watch:esbuild",
"group": "build",
"problemMatcher": "$esbuild-watch",
"problemMatcher": [],
"isBackground": true,
"label": "npm: watch:esbuild",
"presentation": {
Expand Down
63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,78 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

### Added

- Profile management support for omg.lol profiles and /now pages
- Profile and /now page tree view in activity bar (separate from pastebin view)
- Open profile command (`pastepad.openProfile`) to edit main profile
- Open /now page command (`pastepad.openNowPage`) to edit /now page
- Live preview panel for profiles and /now pages with markdown rendering
- Profile preview toggle command (`pastepad.previewProfile`) with `Ctrl+Shift+V` shortcut
- Publish profile command (`pastepad.publishProfile`) to force save changes
- View profile in browser command (`pastepad.openProfileInBrowser`)
- Profile picture upload functionality (`pastepad.uploadProfilePicture`) with full multipart/form-data support
- Support for PNG, JPG, GIF, WebP, SVG image formats for profile pictures
- File size validation (5MB limit) for profile picture uploads
- Progress indicators during profile picture upload
- Complete weblog API implementation (9 endpoints) for future weblog features
- `getWeblogEntries()` - List all weblog entries
- `getWeblogEntry(entryId)` - Retrieve specific weblog entry
- `getLatestWeblogPost(address)` - Retrieve latest weblog post (no auth required)
- `createWeblogEntry(entryId, content)` - Create new weblog entry
- `deleteWeblogEntry(entryId)` - Delete weblog entry
- `getWeblogConfiguration()` - Retrieve weblog configuration/settings
- `updateWeblogConfiguration(configuration)` - Update weblog configuration
- `getWeblogTemplate()` - Retrieve custom HTML template
- `updateWeblogTemplate(template)` - Update custom HTML template
- Weblog entry management: list, get, create, delete, and latest post retrieval
- Weblog configuration management: get and update weblog settings
- Weblog template management: get and update custom HTML templates
- Complete some.pics API implementation (3 endpoints) for image hosting
- `uploadToSomePics(filePath, tags?, address?)` - Upload images with Base64 encoding
- `updateSomePicsMetadata(imageId, metadata, address?)` - Update alt text, description, tags, visibility
- `getSomePicsImage(imageId, address?)` - Retrieve image metadata
- Image upload validation (5MB limit, PNG/JPG/GIF/WebP support)
- Test suite covering some.pics API (6 tests)
- some.pics API discovery documentation for future picture sharing features
- FileSystemProvider for `omgprofile:` and `omgnow:` schemes
- Automatic 404 handling for profiles and /now pages that don't exist yet
- Support for omg.lol profile placeholders (`{profile-picture}`, `{address}`, `{last-updated}`)
- Profile theme and styling support in preview panel
- omg.lol theme API integration (`getTheme()`, `getThemePreviewHtml()`)
- Fetch and apply actual omg.lol theme CSS to profile and /now page previews
- Support for custom profile CSS and head content in previews
- Context values (`pastepad.isProfileDocument`, `pastepad.isNowPageDocument`) for UI conditionals
- View paste in browser command (opens `https://{address}.paste.lol/{title}`)
- Test suite covering paste commands
- Right-click context menu for paste items in tree view
- Localization support with `package.nls.json` for better maintainability
- Spanish localization support with `package.nls.es.json`
- TypeScript interfaces for WeblogEntry, WeblogConfiguration, and WeblogTemplate

### Changed

- Minimum VS Code version requirement reduced to 1.84.0 (from 1.107.1) for broader compatibility
- Tests now run against VS Code 1.84.0 to ensure backward compatibility
- Extension now activates on startup (`onStartupFinished`) instead of only when views are opened
- Fixed profile API endpoint from `/address/{address}/profile` to `/address/{address}/web`
- Fixed profile update API to include `publish: true` parameter
- Now page API uses correct `listed` parameter format (`'1'` or `'0'` as strings)
- Improved error handling for missing profiles and /now pages
- Profile and /now page commands no longer use i18n placeholders for immediate visibility
- Moved all user-facing strings to localization file per VS Code best practices
- Improved profile cache invalidation after picture upload
- Enhanced error handling for file operations with user-friendly messages

### Fixed

- Profile and /now pages now load correctly (previously returned 404 errors)
- Profile preview panel displays correctly with proper data extraction
- Profile update requests now use the correct API endpoint
- File system providers properly handle empty content for new profiles/now pages
- Profile and /now page preview now reliably opens in split view using `ViewColumn.Beside`
- Preview panel placement is now dynamic and works correctly regardless of active editor column
- Editor opens first in active column, establishing anchor for preview to appear beside it
- Preview preserves focus in editor using `takeFocus: false` parameter
- Completed stubbed profile picture upload command with full implementation

## [0.3.0] - 2026-01-03

Expand Down
9 changes: 9 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ Email security issues to: [database@omg.lol](mailto:database@omg.lol)
- Local cache uses VS Code's workspace state
- Paste content is not logged

**Your Images (some.pics)**

- Images uploaded to some.pics are Base64-encoded and transmitted via HTTPS
- File size validation enforced (5MB limit) to prevent excessive resource usage
- File type validation restricted to PNG, JPG, GIF, WebP formats
- Image content never logged or cached locally
- Temporary files read from disk for upload and immediately discarded
- No image processing or modification beyond Base64 encoding

**Network Security**

- All API requests use HTTPS
Expand Down
116 changes: 72 additions & 44 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,94 @@
# TODO

Some items in the checklist are being considered and not necessarily planned. I haven't separated them yet. I'm focusing on the initial marketplace release to allow for even easier testing and feedback from others.
## 1.0.0 Release Checklist

## Pre-Release Checklist
### Assets

- [ ] Set up OAuth application with omg.lol and configure credentials in `authentication.ts`
- [ ] Update version to 1.0.0
- [ ] Create extension icons
- [ ] Take screenshots for marketplace
- [ ] Lower VS Code minimum version for compatibility
- [ ] Test on different VS Code versions
- [ ] Submit to VS Code Marketplace
- [ ] Consider migrating source code to [SourceTube](https://source.tube/)
- [ ] Extension icon (128x128px PNG) - marketplace listing, activity bar
- [ ] Marketplace screenshots:
- [ ] Paste tree view with context menu
- [ ] Profile editor with preview panel
- [ ] Settings/configuration
- [ ] Example paste being edited
- [ ] Short GIF/demo (as hero?)

## Feature Enhancements
### Documentation

### Status Bar
- [ ] Update README.md:
- [ ] Add Profile & /now page sections
- [ ] Document all config properties (logLevel, profile.autoSync, profile.previewOnOpen)
- [ ] Add screenshots
- [ ] Complete Spanish localization `package.nls.es.json`
- [ ] Create marketplace listing description

### Testing

- [ ] Test on VS Code 1.107.1 (consider lowering minimum)
- [ ] Test on latest stable VS Code
- [ ] Lower minimum version if compatible
- [ ] Test full authentication flow
- [ ] Test all profile & /now page features
- [ ] Test profile picture upload

### Release Tasks

- [ ] Verify .vscodeignore excludes dev files only
- [ ] Test installed VSIX before submission
- [ ] Submit to marketplace

### Post-Release (Optional)

- [ ] Show connection status indicator
- [ ] Display paste count
- [ ] Quick access to refresh command
- [ ] Apply for featured badge
- [ ] Announce on omg.lol Discourse
- [ ] Consider SourceTube migration

### UX Improvements
---

## Post-1.0.0 - Backlog of Ideas

### UX Polish

- Copy URL to clipboard command
- Progress indicators for long operations
- Notification actions (View in Browser, Copy URL after save)
- Input validation for paste titles (prevent duplicates)

### Status Bar

- [ ] Add copy URL to clipboard command
- [ ] Quick pick for fast paste switching (`Ctrl+P` style)
- [ ] Progress indicators for long operations
- [ ] Notification actions (View in Browser, Copy URL after save)
- [ ] Input validation for paste titles (prevent duplicates)
- Connection status indicator
- Paste count display
- Quick refresh button

### Search & Organization

- [ ] Search/filter pastes in tree view
- [ ] Mark pastes as favorites (pin to top)
- [ ] Batch operations (multi-select for delete, visibility change)
- Search/filter/sort pastes in tree view
- Favorites (pin to top)

### Editor Integration

- [ ] Code lenses showing paste metadata in editor
- [ ] Text decorations for visibility status (already have tree view icon)
- [ ] Webview panel for markdown preview
- [ ] Completion provider for paste references (`@@` trigger)
- Code lenses for paste metadata
- Text decorations for visibility status
- Completion provider for paste references (`@@` trigger)

### Power Features

- [ ] Diff view for local vs remote changes
- [ ] Export pastes as VS Code snippets
- [ ] Paste statistics dashboard
- [ ] Drag-drop files to create pastes
- Diff view (local vs remote)
- Export as VS Code snippets
- Drag-drop files to create pastes
- Drag-drop images to upload to `some.pics`
- Paste statistics dashboard

## Technical Debt
### Technical Debt

- [ ] Add error boundary handling
- [ ] Implement retry logic for failed API calls
- [ ] Research VS Code telemetry for usage analytics (and how to improve without it)
- [ ] Performance optimization for large paste collections
- [ ] Unit test coverage for core modules
- [ ] Integration tests for API calls
- Error boundary handling
- Performance optimization for large collections
- Unit test coverage expansion
- Integration tests for API calls
- Architecture diagrams (mermaid - I do love me a good diagram)

## Documentation
### Future Enhancements

- [x] Create CONTRIBUTING.md with contribution guidelines
- [x] Create SECURITY.md with vulnerability reporting
- [ ] Add architecture diagrams (love me a good mermaid diagram)
- [ ] Write API documentation for omg.lol integration
- OAuth authentication (requires omg.lol app setup)
- Webview markdown preview for pastes similar to profile and now pages
- Quick pick paste switching (Ctrl+P style)
- Telemetry for usage analytics (privacy-respecting if needed)
Loading