Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(turborepo): web ui #8895

Merged
merged 17 commits into from
Sep 10, 2024
Merged

feat(turborepo): web ui #8895

merged 17 commits into from
Sep 10, 2024

Conversation

NicholasLYang
Copy link
Contributor

@NicholasLYang NicholasLYang commented Jul 31, 2024

Description

Implements a very very alpha version of a web UI. Uses a GraphQL query to get the current run and tasks.

Testing Instructions

Would love some ideas here on tests.

To try out manually, go to #35066 in the other repo and run turbo-studio, then execute a turbo command with the ui flag set to web

Copy link

vercel bot commented Jul 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 10, 2024 9:04pm
9 Skipped Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2024 9:04pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2024 9:04pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2024 9:04pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2024 9:04pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2024 9:04pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2024 9:04pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2024 9:04pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2024 9:04pm
rust-docs ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2024 9:04pm

Copy link
Contributor

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

✅ This change can build next-swc

Copy link
Contributor

github-actions bot commented Jul 31, 2024

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Turbopack Rust tests (mac/win, non-blocking)

See workflow summary for details

@turbo-orchestrator turbo-orchestrator bot removed the area: examples Improvements or additions to examples label Aug 2, 2024
Copy link

socket-security bot commented Aug 6, 2024

No dependency changes detected. Learn more about Socket for GitHub ↗︎

👍 No dependency changes detected in pull request

Copy link
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

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

Looks like tests are failing.

Aside from that just a minor comment on use of RefCell inside of Mutex.

crates/turborepo-lib/src/run/mod.rs Outdated Show resolved Hide resolved
pub async fn start_server(
rx: tokio::sync::mpsc::UnboundedReceiver<WebUIEvent>,
) -> Result<(), crate::Error> {
let state = Arc::new(Mutex::new(RefCell::new(WebUIState::default())));
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if I understand the use of RefCell inside of the Mutex. Doesn't the Mutex already ensure that there's only ever one access to the underlying data at a time? Why are dynamic borrows necessary inside of the restriction?

If this is necessary a quick comment explaining why would be very appreciated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's so Subscriber can mutate the state even though it's behind an immutable reference. We can't have a mutable reference because Query also needs to hold a reference to it.

@NicholasLYang NicholasLYang enabled auto-merge (squash) September 10, 2024 19:40
@NicholasLYang NicholasLYang merged commit b7a00d3 into main Sep 10, 2024
41 checks passed
@NicholasLYang NicholasLYang deleted the nicholasyang/web-ui branch September 10, 2024 21:30
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.

2 participants