Skip to content

Commit 4d33f11

Browse files
staredclaude
andcommitted
Refactor WebR architecture with pure modules and clean separation of concerns
- Extract pure WebR modules without Vue dependencies to src/webr/ - Create layered architecture: Core → Runtime → Storage → Utils - Replace complex composables with clean, testable modules - Fix output processing to handle R condition objects properly - Add proper TypeScript types throughout, eliminate 'any' usage - Implement consistent error handling with cleanup - Add comprehensive WebR API documentation references Key improvements: - WebRInstance: Clean lifecycle management - Executor: Robust code execution with proper output capture - OutputProcessor: Fixed INFO/WARNING message categorization - Serializer: Handles complex R objects with fallback strategies - PackageManager: Tracks installations with version info - FileSystem: Virtual filesystem operations Output now correctly shows: - INFO: `geom_smooth()` using formula = 'y ~ x' - WARNING: Clean warning messages without duplication 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent a82399a commit 4d33f11

File tree

16 files changed

+1441
-632
lines changed

16 files changed

+1441
-632
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "webr-ggplot2-demo",
33
"private": true,
4-
"version": "0.1.12",
4+
"version": "0.2.1",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src/App.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ const handleFileUpload = async (csvData: CsvData): Promise<void> => {
6060
6161
const handleFileRemoved = (): void => {
6262
currentCsvData.value = null
63-
// Clear any data-related variables in R
64-
void executeCode('if (exists("data")) rm(data)')
6563
}
6664
6765
const handleExampleSelect = async (example: RExample): Promise<void> => {

0 commit comments

Comments
 (0)