Skip to content

move the Yarn workspace root to tools/web (#991) - #991

Open
qimeng77 wants to merge 2 commits into
facebook:devfrom
qimeng77:export-D118637880
Open

move the Yarn workspace root to tools/web (#991)#991
qimeng77 wants to merge 2 commits into
facebook:devfrom
qimeng77:export-D118637880

Conversation

@qimeng77

@qimeng77 qimeng77 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary:

NOTE: Pure move, no behaviour change.

CONTEXT

tools/ was doing two jobs: ~17 C++/Python tool directories and the Yarn workspace root for the web tools. That mix is why the shared web build inputs have to be spelled out by hand — the MkDocs build stamp cannot point at the workspace root without hashing hundreds of C++ files. The next diff deletes those lists; this one just separates the two concerns.

WHAT THIS DIFF DOES

Moved into tools/web/ (116 renames, all sl mv):

  • visualization_app/, compression_playground/, web_common/
  • package.json, yarn.lock, tsconfig*.json, vite.base.ts,
    eslint.config.js, .prettierrc, .prettierignore, .gitignore,
    web_tool.bzl
  • web_workspace_srcs moves out of tools/BUCK into a new tools/web/BUCK,
    contents unchanged

Path updates, 8 files and ~18 lines: both Pages workflows, the
static_docs_test deps in doc/mkdocs/BUCK, src_relative in plugin.py, a
test comment, the GitHub source link in quick-start.md, and a path inside an
error string in wasm_api.js.

Unchanged on purpose: mkdocs.yml's tools/trace and tools/playground are
site URLs, not source paths, and every relative reference inside the workspace
survives because the tree moves together.

Side effect: tools/.gitignore becomes tools/web/.gitignore, so its
unanchored patterns (logs, dist, *.log, *.sln) no longer reach into the
C++ directories.

Differential Revision: D118637880

Summary:
Boilerplate for the new compression playground tool. The page is a stub — a title and a
"work in progress" banner — so the setup lands separately from the tool itself.

Having a second tool made a few more things worth sharing, so they move out of
`visualization_app`: a `Banner` component, the Vite plugin list (`tools/vite.base.ts`),
and three TypeScript presets that leave each tool's tsconfigs holding paths but no
compiler options. `.gitignore` moves to the workspace root as well — the per-tool copy
only covered `visualization_app`, so the playground's `dist/` was unignored.

Banner is `openzl/web-common`'s first export. That package has been empty since it was
created, so nothing had ever imported from it; the tsconfig and peer-dependency changes
in there are what that first import required.

One thing that looks inconsistent in isolation: the playground gains a
`openzl/web-common` dependency while `visualization_app` drops one. That is deliberate
— the playground imports Banner and visualization_app does not.

Deliberately not extracted: the logo, `src/index.css` and `src/main.tsx`. Sharing the
logo would force a shared `publicDir` for a 20 kB file, and the other two genuinely
differ between the two tools.

Differential Revision: D117407369
@meta-codesync

meta-codesync Bot commented Sep 3, 2026

Copy link
Copy Markdown

@qimeng77 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D118637880.

Summary:
Pull Request resolved: facebook#991

NOTE: Pure move, no behaviour change.

## CONTEXT
`tools/` was doing two jobs: ~17 C++/Python tool directories *and* the Yarn workspace root for the web tools. That mix is why the shared web build inputs have to be spelled out by hand — the MkDocs build stamp cannot point at the workspace root without hashing hundreds of C++ files. **The next diff deletes those lists**; this one just separates the two concerns.

## WHAT THIS DIFF DOES
Moved into `tools/web/` (116 renames, all `sl mv`):
* `visualization_app/`, `compression_playground/`, `web_common/`
* `package.json`, `yarn.lock`, `tsconfig*.json`, `vite.base.ts`,
  `eslint.config.js`, `.prettierrc`, `.prettierignore`, `.gitignore`,
  `web_tool.bzl`
* `web_workspace_srcs` moves out of `tools/BUCK` into a new `tools/web/BUCK`,
  contents unchanged

Path updates, 8 files and ~18 lines: both Pages workflows, the
`static_docs_test` deps in `doc/mkdocs/BUCK`, `src_relative` in `plugin.py`, a
test comment, the GitHub source link in `quick-start.md`, and a path inside an
error string in `wasm_api.js`.

Unchanged on purpose: `mkdocs.yml`'s `tools/trace` and `tools/playground` are
site URLs, not source paths, and every relative reference inside the workspace
survives because the tree moves together.

Side effect: `tools/.gitignore` becomes `tools/web/.gitignore`, so its
unanchored patterns (`logs`, `dist`, `*.log`, `*.sln`) no longer reach into the
C++ directories.

Differential Revision: D118637880
@meta-codesync meta-codesync Bot changed the title move the Yarn workspace root to tools/web move the Yarn workspace root to tools/web (#991) Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant