Skip to content

Latest commit

 

History

History
208 lines (165 loc) · 7.38 KB

File metadata and controls

208 lines (165 loc) · 7.38 KB

Orin IDE — Development Log

Quick Reference (Recent Fixes)

Latest Commits (most recent first)

Commit Description
e4822e5 Replace overrides.css with full purple polish version
30e5bcc Chat input: inner padding 0, center-align placeholder text, bottom padding lift
d901a4a Revert chat input changes
e307914 Fix: remove duplicate btn-chat-sessions, add modal-box.lg CSS, fix chat input bar padding
1cf71dd Orin IDE - AI-powered web IDE with 14 new features

Full Session Log

Session 1: Initial Feature Build (14 New Features)

Goal: Build Orin IDE into a full-featured web-based IDE with AI capabilities.

Features Implemented:

  1. AI Terminal (aiterminal.js) — Natural language to shell commands via WebSocket
  2. AI Code Review (aireview.js) — Ctrl+Shift+R toggle, severity-based decorations
  3. AI Explain on Hover (aiexplain.js) — Ctrl+Hover tooltip explanations (does NOT overwrite original AIExplain)
  4. AI Commit Message (aicommit.js) — Generate conventional commit messages from git diff
  5. AI Refactor (airefactor.js) — Inline widget with floating overlay (does NOT overwrite original AIRefactor)
  6. Multi-Cursor — Built into Monaco (Ctrl+D, Alt+Click)
  7. File Favorites (favorites.js) — Pin files to top of tree
  8. Shortcuts Panel (shortcuts.js) — Ctrl+K shows all keyboard shortcuts
  9. Snippets Manager (snippetsmgr.js) — Create/edit/search/insert code snippets
  10. Terminal Themes (termthemes.js) — Theme-synced terminal colors
  11. Voice Commands (voicecommands.js) — "open file X", "run project", "install X", "save"
  12. File Icons (fileicons.js) — Language/asset-specific colored icons
  13. Breadcrumb (breadcrumb.js) — Clickable file path navigation
  14. Auto-Save Indicator (autosave-indicator.js) — Yellow dot on unsaved tabs

Key Decisions:

  • AIExplainTooltip and AIRefactorInline are separate objects that do NOT overwrite originals
  • Terminal sessions use localStorage (like Termux)
  • AI Terminal executes via TermMgr.runFallback() over WebSocket
  • Ctrl+P = Quick Open, Ctrl+Shift+P = Command Palette

Session 2: Offline Ollama Support

Features:

  • OllamaMgr in providers.js for Ollama API integration
  • OllamaPanel for model management
  • Ollama in Model Picker, Top Bar, Chat, Agents
  • Android Termux small models: phi3:mini, gemma2:2b, qwen2.1.5b, tinyllama
  • Models prefixed with ollama/ in storage, prefix stripped for API calls

Session 3: Chat/Agent Session Persistence

Features:

  • ChatSessions in features.js (pin, search, timeline, export/import)
  • AgentSessions in agents.js
  • Session data stored in localStorage (ci_chat_sessions, ci_agent_sessions)
  • Active badge, timeline grouping, session preview
  • Export single/all as JSON, import from JSON

Session 4: Workspace Persistence

Features:

  • Workspace state stored in ci_workspace key
  • Auto-save on tab changes
  • restoreWorkspace/saveWorkspace in editor.js

Session 5: Terminal Sessions (Termux-style)

Rewrite of terminal.js:

  • Sessions stored in localStorage (ci_term_sessions, ci_term_active)
  • Session bar UI with tabs
  • Create/switch/delete/rename sessions
  • Output replay on switch
  • Command history per-session
  • Sessions persist until user explicitly deletes

Session 6: AI Completions v2

Features:

  • Request cancellation via AbortController
  • 40-line context window
  • Top-level imports/declarations gathering
  • 3 completion variants
  • Precise cache keys
  • Temperature 0.05
  • Ctrl+Shift+I toggle

Session 7: Split Editor

Features:

  • Second Monaco instance
  • Draggable splitter
  • Second tab bar
  • Ctrl+\ toggle

Session 8: AI Code Actions

Features:

  • Monaco CodeActionProvider
  • Fix/Explain/Refactor/Tests/Document options
  • Context menu integration (ContextMenuAI)

Session 9: ZIP Import/Export Rebuild

Backend changes (server.js):

  • POST /api/import-zip — JSON+base64 approach
  • Legacy multipart support via POST /api/export/import
  • archiver v8 { ZipArchive } class fix

Key fix: archiver v8 changed from require('archiver') function to { ZipArchive } class export.

Session 10: Glassmorphism UI (Reverted)

Attempted: Full CSS rewrite with glassmorphism effects Result: Reverted — broke CSS selectors and chat UI Lesson: Never rewrite entire CSS files; only modify existing selectors

Session 11: Safe Glassmorphism (Reverted)

Attempted: Add --glass-* variables and backdrop-filter without changing structure Result: Reverted per user request — user preferred clean purple theme

Session 12: Bug Fixes

Issues Fixed:

  1. Duplicate id="btn-chat-sessions" — removed redundant button (line 700)
  2. Missing .modal-box.lg CSS — added max-width: 720px
  3. Chat input bar broken — overrides.css stripped padding/gap from .chat-row

Session 13: Chat Input Polish

Changes:

  • Inner padding set to 0
  • Center-aligned placeholder text (text-align: center)
  • Bottom padding lift (.chat-input-wrap padding: 0 0 12px 0)
  • overrides.css replaced with full purple polish version

Architecture Notes

CSS File Load Order

main.css → sidebar.css → editor.css → terminal.css → chat.css → modals.css → mobile.css → agents.css → overrides.css

overrides.css loads LAST and uses !important to override earlier styles.

Key JS Modules

Module File Purpose
EditorMgr editor.js Monaco editor management
FileTree filetree.js File explorer with favorites
ChatMgr chat.js AI chat with sessions
AgentsMgr agents.js Multi-agent system
TermMgr terminal.js Terminal sessions
ThemeMgr theme.js Theme system (6 themes)
ModelPicker providers.js Model selection + Ollama
QuickOpen quickopen.js Ctrl+P fuzzy search
ContextMenuAI features.js Right-click AI actions
AICompletions aicompletions.js Inline code suggestions
SplitEditor spliteditor.js Dual editor panes

Storage Keys

Key Purpose
ci_term_sessions Terminal session data
ci_term_active Active terminal session
ci_chat_sessions Chat session data
ci_agent_sessions Agent session data
ci_chat_pinned Pinned chat sessions
ci_workspace Workspace state
ci_theme Current theme
ci_model Current AI model
ci_provider Current provider

API Endpoints

Endpoint Method Purpose
/api/import-zip POST Import project (JSON+base64)
/api/export-zip/:proj GET Export project as ZIP
/api/export/import POST Legacy multipart import
terminal:exec WebSocket Execute terminal commands

Important Patterns

  • All init calls in app.js wrapped in individual try-catch
  • API.execCommand() uses WebSocket for streaming output
  • API.execCmd() uses POST endpoint (broken — endpoint doesn't exist)
  • fileIcon() global function delegates to FileIcons.render()
  • getSelectedCode() and replaceSelectedCode() in features.js
  • renderMD() in utils.js for markdown rendering
  • Ctx object in utils.js is localStorage wrapper

Git Remote

  • URL: git@github.com:nandandas2407-web/Ide.git
  • Branch: main
  • License: MIT, Copyright 2026 Nandan Das

How to Restore

git clone git@github.com:nandandas2407-web/Ide.git
cd Ide
npm install
node server.js