Skip to content

refactor(web): remove legacy editor#108

Merged
andrewmelchor merged 2 commits intomainfrom
refactor(web)/remove-legacy-editor
Mar 3, 2026
Merged

refactor(web): remove legacy editor#108
andrewmelchor merged 2 commits intomainfrom
refactor(web)/remove-legacy-editor

Conversation

@andrewmelchor
Copy link
Copy Markdown
Member

Summary

This PR removes the legacy .http code editor from the HTTP route in packages/web, so the Request Workspace (Params / Headers / Body) is now the only authoring surface for HTTP requests in the left pane.

Why

Prevents dual-editing surfaces (workspace tabs + raw editor) that can drift and confuse save/execute behavior.
Aligns the UI with the phased request-workspace rollout where tab-based request editing is the primary flow.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 3, 2026

Greptile Summary

This PR removes the legacy HttpEditor (raw .http code editor) from the HTTP route in EditorWithExecution.tsx, making RequestWorkspaceTabs the sole authoring surface for HTTP requests in the left pane. The render block and import are cleanly removed, and the container div's layout classes are updated (flex flex-coloverflow-auto) to accommodate the workspace-only layout.

Key findings:

  • The HttpEditor component and its supporting files (HttpEditor.tsx, the index.ts re-export, and the lazy.ts lazy wrapper) are not deleted and remain as dead code. The component's heavy dependencies (codemirror, all @codemirror/* plugins) will continue to be included in the bundle unless these are removed.
  • The layout change on the left-pane container (flex h-full min-h-0 flex-colh-full min-h-0 overflow-auto) is intentional and consistent with the removal of the flex-sibling HttpEditor block, but should be verified visually since it changes the layout model for RequestWorkspaceTabs.

Confidence Score: 3/5

  • Safe to merge for functionality, but the incomplete cleanup leaves dead code and prevents full bundle savings.
  • The active code path change is straightforward and low-risk — the HttpEditor render block is simply removed. However, the refactor is incomplete: HttpEditor.tsx, its export in index.ts, and its lazy wrapper in lazy.ts are all left behind, meaning the stated goal of removing the legacy editor is only half-done and the associated codemirror dependencies remain in the bundle.
  • packages/web/src/components/editor/HttpEditor.tsx, packages/web/src/components/editor/index.ts, and packages/web/src/components/editor/lazy.ts — all retain references to the now-unused HttpEditor and should be cleaned up.

Important Files Changed

Filename Overview
packages/web/src/components/editor/EditorWithExecution.tsx Removes the HttpEditor import and its render block; container div loses flex flex-col in favour of overflow-auto. The HttpEditor usage is successfully removed, but HttpEditor.tsx, its re-export in index.ts, and its lazy wrapper in lazy.ts remain as dead code.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[EditorWithExecution] --> B{fileType?}
    B -- http --> C[RequestSelectorBar]
    C --> D[ResizableSplitPane]
    D --> E["Left Pane\n(div.h-full.overflow-auto)"]
    D --> F[Right Pane — ExecutionDetail]
    E --> G[RequestWorkspaceTabs\nParams / Headers / Body]
    G -.->|previously also rendered below| H["❌ HttpEditor (removed)"]
    B -- script/test --> I[ResizableSplitPane]
    I --> J[CodeEditor]
    I --> K[ScriptPanel]

    style H stroke-dasharray: 5 5,fill:#ffcccc,color:#333
Loading

Last reviewed commit: d89de71

Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

import { ScriptPanel } from '../script';
import { CodeEditor } from './CodeEditor';
import { HttpEditor } from './HttpEditor';
import { RequestSelectorBar } from './RequestSelectorBar';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead code not fully removed

The PR's stated goal is to remove the legacy HTTP editor, but HttpEditor.tsx itself was never deleted, and two other files still reference it:

  • packages/web/src/components/editor/index.ts (line 4) still re-exports HttpEditor:
    export { HttpEditor } from './HttpEditor';
  • packages/web/src/components/editor/lazy.ts (line 4) still exports a lazy-loaded version:
    export const LazyHttpEditor = lazy(() => import('./HttpEditor'));

Since HttpEditor is no longer consumed anywhere (confirmed via search — only these two export sites reference it), these exports are now dead code that keeps the bundler from tree-shaking the entire HttpEditor module and its dependencies (codemirror, @codemirror/*). The HttpEditor.tsx source file should also be deleted as part of this refactor.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d89de71509

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@andrewmelchor andrewmelchor merged commit 37bfbe9 into main Mar 3, 2026
1 check passed
@andrewmelchor andrewmelchor deleted the refactor(web)/remove-legacy-editor branch March 3, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant