diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..001ab00 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,297 @@ +# CLAUDE.md - OpenMaui XAML Reconstruction + +## CURRENT TASK: Reconstruct XAML from Decompiled Code + +The sample applications (ShellDemo, TodoApp, XamlBrowser) were recovered from decompiled DLLs. The XAML files were compiled away - we have only the generated `InitializeComponent()` code. **Screenshots will be provided** to help verify visual accuracy. + +--- + +## Project Locations + +| What | Path | +|------|------| +| **Main codebase** | `/Users/nible/Documents/Gitea/maui-linux/` | +| **Samples (target)** | `/Users/nible/Documents/Gitea/maui-linux-samples` | +| **Decompiled samples** | `/Users/nible/Documents/GitHub/recovered/source/` | + +--- + +## Git Branch + +**Work on `final` branch.** Commit frequently. + +```bash +git branch # Should show: * final +``` + +--- + +## XAML Reconstruction Overview + +### ShellDemo (10 pages + shell + app) + +| File | Status | Notes | +|------|--------|-------| +| App.xaml | [ ] | Colors, Styles (ThemedEntry, TitleLabel, etc.) | +| AppShell.xaml | [ ] | Shell with FlyoutHeader, 9 FlyoutItems | +| HomePage.xaml | [ ] | Welcome screen with logo | +| ButtonsPage.xaml | [ ] | Button demos | +| TextInputPage.xaml | [ ] | Entry/Editor demos | +| SelectionPage.xaml | [ ] | CheckBox, Switch, RadioButton demos | +| PickersPage.xaml | [ ] | DatePicker, TimePicker, Picker demos | +| ListsPage.xaml | [ ] | CollectionView demos | +| ProgressPage.xaml | [ ] | ProgressBar, ActivityIndicator demos | +| GridsPage.xaml | [ ] | Grid layout demos | +| AboutPage.xaml | [ ] | About information | +| DetailPage.xaml | [ ] | Navigation detail page | + +### TodoApp (app + 3 pages) + +| File | Status | Notes | +|------|--------|-------| +| App.xaml | [ x] | Colors, Icon strings | +| TodoListPage.xaml | [x ] | Main list with swipe actions | +| NewTodoPage.xaml | [x ] | Add new todo form | +| TodoDetailPage.xaml | [ x] | Edit todo details | + +### XamlBrowser (app + 1 page) - Needs Review + +| File | Status | Notes | +|------|--------|-------| +| App.xaml | [x] | Colors, styles (NavButtonStyle, GoButtonStyle, AddressBarStyle, StatusLabelStyle) | +| App.xaml.cs | [x] | BrowserApp with ToggleTheme() | +| MainPage.xaml | [x] | Toolbar with nav buttons, address bar, WebView, status bar | +| MainPage.xaml.cs | [x] | Navigation logic, progress animation, theme toggle | +| MauiProgram.cs | [x] | UseLinuxPlatform() setup | +| Program.cs | [x] | LinuxProgramHost entry point | +| Resources/Images/*.svg | [x] | 10 toolbar icons (dark/light variants) - retrieved from Google Icons | + +--- + +## How to Reconstruct XAML + +### Step 1: Read the decompiled InitializeComponent() + +Look for patterns like: +```csharp +// Setting a property +((BindableObject)val8).SetValue(Label.TextProperty, (object)"OpenMaui"); + +// AppThemeBinding (light/dark mode) +val7.Light = "White"; +val7.Dark = "#E0E0E0"; + +// StaticResource +val.Key = "PrimaryColor"; + +// Layout hierarchy +((Layout)val12).Children.Add((IView)(object)val6); +``` + +### Step 2: Convert to XAML + +```csharp +// This C#: +((BindableObject)val8).SetValue(Label.TextProperty, (object)"OpenMaui"); +((BindableObject)val8).SetValue(Label.FontSizeProperty, (object)22.0); +((BindableObject)val8).SetValue(Label.FontAttributesProperty, (object)(FontAttributes)1); +val7.Light = "White"; +val7.Dark = "#E0E0E0"; +((BindableObject)val8).SetBinding(Label.TextColorProperty, val74); +``` + +```xml + +