All work

04 / AI development workspace

Polaris

A Next.js and TypeScript browser IDE connecting a file tree, code editor, terminal, live preview, GitHub import/export, and AI assistance.

Role
Independent frontend and product engineer
Period
2026
Scale
Editor · runtime · repositories · AI
Status
Working prototype

01 / Product tension

An AI editor brings several systems together.

Import a GitHub repository, open a file, request an AI change, and run the result in a browser preview. Each step crosses a different lifecycle: repository work, editor state, persisted files, background AI execution, and a running WebContainer.

02 / Workspace model

One workspace. Three different clocks.

The workspace stays coherent by giving each kind of state its own pace and source of truth. Immediate feedback never pretends to be a saved result, and background work never blocks the editor.

01

Immediate

Selection, open files, pane layout, and unfinished input.

02

Persistent

Projects, file records, conversations, and user ownership.

03

Asynchronous

AI requests, context retrieval, monitoring, and background work.

03 / AI workflow

The interaction continues after the button is released.

The interface acknowledges intent immediately, then turns it into durable background work. Context assembly, model execution, streaming, and persistence remain visible as separate stages—so a slow or failed step can be understood and recovered.

AI request / observable execution Workflow active
01Select codeEditor range
02Add instructionUser intent
03Assemble contextFiles + history
04Run modelBackground task
05Stream responseIncremental result
06Persist conversationDurable record
Intent acceptedContext resolvedResult retained

04 / Integration boundaries

Every subsystem gets a narrow contract.

Adapter code is deliberate friction: it keeps a tool change from becoming a workspace rewrite.

Contract map / five guarded seams Boundaries active
01Editor adapter
OwnsDocuments, selection, edits
Kept outsidePersistence
02Project service
OwnsProjects and file records
Kept outsideEditor presentation
03AI workflow
OwnsPrompt execution and progress
Kept outsideWorkspace layout
04Conversation model
OwnsMessages and continuity
Kept outsideModel implementation
05Observability
OwnsFailures, traces, AI requests
Kept outsideProduct behavior
CapabilityProtected responsibility

05 / Product surface

Import, edit, run, and export from one browser workspace.

The prototype connects repository import, editing, AI assistance, terminal output, and live preview. Runtime support, service access, and review remain visible constraints on that workflow.

Implemented workflowWorking now
  • 01Authenticated project workspace and file tree
  • 02Resizable layout and multi-file editing
  • 03CodeMirror editor, AI suggestions, and quick edit
  • 04Persistent conversations and background AI workflows
  • 05Coding agent with project file tools
  • 06WebContainer execution, terminal, and live preview
  • 07GitHub repository import and export
  • 08Error and model monitoring
Operating constraintsReview before use
  • 01Browser execution depends on WebContainer support
  • 02GitHub workflows require connected repository access
  • 03AI and persistence depend on configured external services
  • 04Generated changes still require engineering review

06 / Engineering decisions

The product shape determined the architecture.

Each choice turns a product pressure into a deliberate boundary. The cost stays visible alongside the behavior it makes possible.

01 / Decision

Long-running work should not belong to a request

Pressure
AI tasks can outlive navigation or a server response.
Decision
Move durable execution into background workflows.
Cost
More states and operational components.
The interface remains responsive while work continues independently.
02 / Decision

The editor should remain replaceable

Pressure
Specialized editor APIs can leak through an entire product.
Decision
Put editor operations behind a narrow workspace adapter.
Cost
Additional translation code.
Product workflows depend on editing capabilities, not editor internals.
03 / Decision

Context should be explicit

Pressure
Useful output depends on code, project state, history, and documentation.
Decision
Assemble context as an observable workflow.
Cost
More orchestration and monitoring.
AI behavior becomes easier to inspect and improve.

07 / Outcome

Import a repository, edit files, run a browser preview, and work with an AI assistant in one workspace.