History Tracking
How It Works
Every time you execute a tool action (e.g., format JSON, encode Base64, generate a hash), the app saves:- Tool ID — Which tool was used
- Input — The text you provided (truncated to 100,000 characters)
- Output — The result produced by the tool
- Timestamp — When the action was performed
- Starred status — Whether you’ve favorited this entry (future feature)
History is saved per tool. Each tool maintains its own separate history of up to 50 entries.
Storage Limits
- Max entries per tool: 50
- Input truncation: Inputs longer than 100,000 characters are truncated with
...appended - Auto-cleanup: When you exceed 50 entries, the oldest entries are automatically deleted
Privacy Guarantees
- All history is stored in IndexedDB on your device
- No data is transmitted to any server
- History is isolated per browser profile
- Clearing browser data deletes your history
- No analytics or tracking of what you process
IndexedDB Structure
Kayston’s Forge uses Dexie.js as a wrapper around IndexedDB for reliable storage.Database Schema
Implementation Details
The history system is implemented in:lib/db.ts— Dexie database definition and migration logichooks/useHistory.ts— React hook for saving, loading, and clearing historycomponents/tools/ToolWorkbench.tsx— UI integration for history panel
Viewing History
The planned UI will include:- History panel — Accessible via a button in the tool workbench
- Entry list — Recent entries sorted by timestamp (newest first)
- Restore action — Click an entry to restore its input/output
- Clear history — Button to delete all entries for the current tool
- Search/filter — Find specific entries by input/output content
Favorites System
Thefavorites table is designed for marking tools as favorites for quick access.
The favorites feature is not yet implemented in the UI. The database table exists but is not currently used by any component.
- Star tools — Mark frequently used tools as favorites
- Quick access — Favorites appear at the top of the sidebar
- Persistent — Favorites are stored in IndexedDB and persist across sessions
Settings Storage
Thesettings table is a key-value store for app preferences. Currently unused, but reserved for:
- Theme preferences (light/dark mode)
- Default actions for tools
- UI layout preferences
- Accessibility settings
Data Migration
The app includes automatic migration from the legacy database nameAdlersForgeDB to the current KaystonsForgeDB.
Clearing History
Per Tool
Use the clear history button in the tool workbench (when implemented) to delete all entries for the current tool.All Data
To completely clear all app data:- Open browser DevTools (
F12) - Go to Application > Storage > IndexedDB
- Right-click KaystonsForgeDB and select Delete database
- Chrome: Settings > Privacy and security > Clear browsing data > Cookies and site data
- Firefox: Settings > Privacy & Security > Cookies and Site Data > Manage Data
- Safari: Preferences > Privacy > Manage Website Data
Browser Compatibility
IndexedDB is supported in all modern browsers:- ✅ Chrome 24+
- ✅ Firefox 16+
- ✅ Safari 10+
- ✅ Edge 12+
Performance Considerations
- Non-blocking: History saves are asynchronous and don’t block tool execution
- Efficient queries: Dexie uses indexes (
toolId,timestamp) for fast lookups - Storage quota: IndexedDB can typically store at least 50 MB per domain (varies by browser)
- Auto-cleanup: Old entries are deleted automatically to prevent unbounded growth
Future Enhancements
Planned improvements to the history system:- Export/import — Download history as JSON, restore from backup
- Search — Full-text search across input/output content
- Starred entries — Pin important entries to the top
- Sync — Optional cloud sync (with explicit user opt-in)
- Compression — Compress large inputs/outputs to save space