- Rust 97.8%
- Python 1%
- Shell 0.8%
- Java 0.4%
|
Some checks are pending
nigig-build (CAD) / full-crate-check (push) Waiting to run
nigig-build (CAD) / supply-chain (push) Waiting to run
nigig-build (CAD) / cad-module (push) Waiting to run
nigig-build (CAD) / cad-engine-coverage (push) Waiting to run
nigig-build (CAD) / doc-workspace-coverage (push) Waiting to run
nigig-build (CAD) / cad-widget-coverage (push) Waiting to run
repo hygiene / hygiene (push) Waiting to run
A 2,000-part plan view with everything on screen cost 2,270 tessellation
calls a frame. It now costs four: two for the grid, two for the parts.
`stroke()` tessellates the whole accumulated path and clears it --
`tessellate_path_stroke` ends in `path.clear()` -- so queueing many
subpaths and stroking once is one tessellation instead of N. The idiom
was already in this file: `queue_dashed_line` has done it for the axis
grid since Phase 3.9, guarded by a test. Phase 4 applies it to the two
loops that never adopted it.
**Base grid: two passes, two strokes.** Minors queued and stroked at
0.55, majors at 1.6 -- the stroke width is the one thing that genuinely
needs its own call. `GridRange::has_minor_lines`/`has_major_lines`
decide whether a pass runs at all and `frame_budget` counts strokes with
the same two predicates, because an empty `stroke()` still enters the
tessellator and a budget that assumed two when the renderer made one
would be wrong in the direction that hides work. Minors stroke first so
majors land on top where they cross; same colour either way, so the only
visible difference is that the thicker line wins a crossing, which is
the right answer.
**Parts grouped by colour.** New `batching::ColorKey` -- the bit pattern,
because `f32` is not `Hash` and two colours whose bits differ are two
colours -- feeding the same `group_in_first_appearance_order` that
Phase 3 groups shapes with. The colour policy moved out of the two draw
loops into `constants::part_outline_color`, so the renderer and
`frame_budget` cannot disagree about how many groups a frame has; the 2D
loop had `vec4(1.0, 0.82, 0.40, 1.0)` written out where
`PART_SELECT_COLOR` already existed.
**Selected and hovered parts stroke last**, in their own groups, so a
highlight is never hidden under a neighbour's outline. They were
interleaved in document order before and could be.
`FrameBudget` gained `grid_lines` and `part_outlines` beside the call
counts. Geometry volume and call count are different numbers now and
both are worth reading -- `VectorSubmission { outlines, stroke_calls }`
mirrors Phase 3's `MeshSubmission` for the same reason.
Measured (bench_frame_submission_budget, 1920x1080, 200 m site):
zoom 5 m, 2000 parts: 12 visible outlines -> 4 tessellations (was 2170)
zoom 200 m, 2000 parts: 2000 visible outlines -> 4 tessellations (was 2270)
The second row is the point, and it is the row Phase 1 could not move:
everything is on screen, culling removes nothing, and the frame still
costs four calls.
WHAT THIS DOES NOT DO: vertex volume is unchanged. The same 2,000
rectangles are tessellated -- in two calls rather than 2,000. What is
saved is per-call overhead: tessellator setup, two `std::mem::take`s and
an `append_geometry` each time. If a 2,000-part plan view is still slow
after this, the remaining cost is triangles, which is Phase 5 and should
only happen if a measurement asks for it.
One visible-behaviour caveat, stated rather than buried: parts of the
same colour are now drawn together, so where two outlines of *different*
colours overlap, which is on top can change. They are 1.8 px outlines
and the highlight ordering got strictly better, but it is a change to
what is drawn, not only to how.
Two tests were wrong before the code was, which is becoming this plan's
pattern. `constants.rs` fell to 81.82% and the coverage floor caught it
-- `part_outline_color` had no tests, and it now has five. And the guard
test's first draft looked for a closing brace at a fixed indentation,
matched the wrong one, and failed on correct code; it matches braces
properly now.
Verified: tools/test-cad-coverage.sh green -- total 97.33%, batching.rs
100%, cull.rs 100%, render_budget.rs 99.68%, constants.rs 98.55%, all
floors met; cargo check --locked -p nigig-build --lib clean; cargo test
--lib 1114 passed (1100 + 14 new); --test cad_integration 154 passed;
CAD_BENCH=1 harness green; cargo fmt --check and git diff --check clean.
|
||
|---|---|---|
| .forgejo | ||
| crates | ||
| REVIEWS | ||
| tools | ||
| ui | ||
| .gitattributes | ||
| .gitignore | ||
| BENCH_BASELINE.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CODE_QUALITY_IMPROVEMENT_SUMMARY.md | ||
| deny-nigig-build.toml | ||
| deny.toml | ||
| MAKEPAD_CODEBASE_ASSESSMENT.md | ||
| MAKEPAD_CODEBASE_IMPROVEMENT_COMPLETE.md | ||
| MAKEPAD_MAP_BRUTAL_ASSESSMENT.md | ||
| MAKEPAD_STUDIO_REMOTE_TESTING.md | ||
| MAKEPAD_TEST_FRAMEWORK.md | ||
| MAKEPAD_TESTING_BEST_PRACTICES.md | ||
| MAP_REWRITE_PROGRESS.md | ||
| nigig_fingerprint_pay_enabled | ||
| NIGIG_PDF_FEATURE_PARITY_PLAN.md | ||
| PAYMENT_RISK_REGISTER.md | ||
| PHASE0_ARCHITECTURE.md | ||
| PHASE0_CRITICAL_BUGS.md | ||
| PHASE0_DATAFLOW.md | ||
| PHASE0_DEPENDENCIES.md | ||
| PHASE0_EXECUTION_PLAN.md | ||
| PHASE0_PERFORMANCE_BASELINE.md | ||
| PHASE0_STATUS.md | ||
| PHASE1_BUG_FIXES.md | ||
| PHASE1_BUGFIX_SUMMARY.md | ||
| PHASE1_STATUS.md | ||
| PHASE2_PERFORMANCE_SUMMARY.md | ||
| PHASE2_STATUS.md | ||
| PHASE3_CODE_QUALITY_SUMMARY.md | ||
| PHASE3_RENDERGRAPH_SUMMARY.md | ||
| PHASE4_SECURITY_SUMMARY.md | ||
| PHASE4_TESTING_SUMMARY.md | ||
| PHASE5_CODE_QUALITY_SUMMARY.md | ||
| PHASE5_DOCUMENTATION_SUMMARY.md | ||
| PHASE6_TESTING_VALIDATION.md | ||
| README.md | ||
| rust-toolchain.toml | ||
| rust_out | ||
| TEST_BASELINE.md | ||
| THIRD_PARTY_NOTICES.md | ||
| THREAT_MODEL.md | ||
| VALHALLA_COMPLETE_PORT_EXECUTION_PLAN.md | ||
| VALHALLA_RUST_REWRITE_PLAN.md | ||
| workflow.md | ||
nigig-org
cargo makepad android --manifest --app-label="PFN" --abi=aarch64 run -p pageflipnav --release
cargo makepad android adb logcat -d | grep -A80 -B20 -E "FATAL EXCEPTION|beginning of crash|thread panicked|Makepad|Abort message"
cargo run -p pageflipnav --release -- --hot
the pich to zomm does not work still you have not implemented the overlay effect on top of the map the rider1 image is not implemented when we first load into rider screen we need to pull the location api to load the map as per the user location current location be detected and the map to load at the said location
now the plan for this whole code base is that each crate should have its own standalone navbar since we should be able to run each crate nigigi-* as a stanalone app except for nigig-core/nigig-uikit. Then pageflipnav can run them all in one app where we have the navbar define in pageflivnav crate/main app, but when compiling say nigig-rider and any of nigig-* app except *-core and -uikit the bottom bar for the respective app do not show up which should show up to be able to navigate the single app when compiled. so we should have each of nigig- respective nav item show in the respective cratea and when we are compiling for pageflipnav app they should aslo show up as nav items for navigation.
now we shall have a dilema where in the pageflip app nav current pulling up the bottom sheet we have the the navigation sheet to Mobility | Profile | Preferences
| Component | Status |
|---|---|
| Table Phase 1 (static rendering) | ✅ Done |
| Table Phase 2 (hover + cell editing) | ✅ Done |
| doc-model | ✅ Done (with tests) |
| pdf-export | ✅ Done (minimal B&W, both fonts embedded) |
| invoicer UI Phase 1 | ✅ Done (load + display + export, line-item editing) |
| invoicer UI Phase 2 | ⏳ Editable header fields, currency/tax pickers, doc switcher |
| invoicer UI Phase 3 | ⏳ File browser, search, recent docs |
| Table Phase 3+ | ⏳ PopupMenu, drag-reorder, LaTeX cells |
also a button besides the phone input to access phone books to search for number or select a number from phonebook to send, also where is the network status indicator to be shown on the page for network bars and status some transaction requests may not proceed especially in concrete heavy settlement where network is poor 334 dialing may not happend so we need to give the status and the transaction retry in the background be triggered and for the transaction to proceed if we need to for phonebook we have the sms app which tries to syncnronise sms recepients and there names if we dont have robius contacts we create it and wire it up we can allow a dektop or wasm makepad app to send a message since we cannot diall in a desktop context unless we a modem connected
also investigate the searchable combox box used at the home page why item do not scroll on touch or mouse interactions
we should also have a dropdown pill which is persistence at at pages at the top left of the app mobile screen showing the user account avator and dropdown for user account/and projects created so the user can easiliy switch between projects which will govern which apps or crates will be shown since in project creation will suggest which apps to use for the said project and the user can cycle through them at this pill
cp -rf crates/apps/nigig-pay-ui/nigig_solution/nigig-pay-ui/* crates/apps/nigig-pay-ui
&& cp -rf crates/apps/nigig-pay-ui/nigig_solution/nigig-mpesa/* crates/apps/nigig-mpesa
&& cp -rf crates/apps/nigig-pay-ui/nigig_solution/nigig-pay/* crates/apps/nigig-pay
&& cp -rf crates/apps/nigig-pay-ui/nigig_solution/nigig-core/* crates/nigig-core
&& cp -rf crates/apps/nigig-pay-ui/nigig_solution/nigig-uikit/* crates/nigig-uikit
&& clear && cargo makepad android --manifest --app-label="PFN" --abi=aarch64 run -p pageflipnav --release
# Verify a Cloudflare token. Supply it via the environment; never inline it.
curl "https://api.cloudflare.com/client/v4/user/tokens/verify" \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
eb2c0657ac11f1b4d8056280da4acee0
the mobile app the 3d object seems transparent. the 2faces of a cube facing the screen to the human eye is transparent but the 2 behind faces in this view of the cube seem opaque.
but desktop app the cube or objects are all solid
also we can create a dropdown like in revit to see the objects in wireframe, solid, colored, real
also the sync is only working in desktop and not in mobile app
Phase 1: Change the parts field type from Vec to Vec in mod.rs, but keep ScenePart as a compatibility wrapper. Add conversion methods so existing code continues to work.
Phase 2: Gradually migrate each method to use CadNode fields directly.
Phase 3: Delete ScenePart and scene_conversion.rs.
Mostly yes.
From the current codebase and the comparison document you shared, many of the originally proposed architectural features are already implemented, while a few remain partially implemented or are still missing.
| Feature | Status |
|---|---|
| Immutable CAD scene | ✅ Implemented |
| Export abstraction (GLTF/PDF) | ✅ Implemented |
| Visitor-based traversal | ✅ Implemented |
| Mesh cache | ✅ Implemented (could use parameter hashing) |
| Strong typed scene IDs | ✅ Implemented |
| Multi-selection | ✅ Implemented |
| Properties panel | ✅ Implemented |
| Split 2D/3D workspace | ✅ Implemented |
| Construction geometry | ✅ Implemented |
| Work planes (XY/XZ/YZ) | ✅ Implemented |
| Extrusion workflow | ✅ Implemented |
| Axis grids & story levels | ✅ Implemented |
| AutoCAD coordinate parser | 🟡 Partially implemented |
| Grid snap | ✅ Implemented |
| Endpoint/Midpoint snap | ✅ Implemented |
| Perpendicular/Nearest/Intersection snap | 🟡 UI exists, snapping logic incomplete |
| Dynamic tool system | ✅ Implemented |
| Rubber-band drawing | ✅ Implemented |
| Hover highlighting | ✅ Implemented |
| Marquee selection | ✅ Implemented |
Building the payment apps
Default build — USSD automation enabled
cargo run -p pageflipnav --features demo # equivalent: automation is default-on
cargo run -p pageflipnav # same thing
pageflipnav is the crate that produces the APK. A default build drives the
*334# menu through the AccessibilityService, shows the M-Pesa PIN field,
and dispatches payments. This is the app's primary function and it works out
of the box.
USSD only has a real backend on Android. On Linux, macOS and Windows
every call returns PermanentlyUnavailable, so dispatch cannot work there
regardless of flags. The device also needs the USSD AccessibilityService
enabled in system settings.
Packaging build — tracker only, no PIN capture
cargo build -p pageflipnav --no-default-features --features native
This produces a build that never dials USSD and in which the PIN field is not
compiled at all (form_pin does not exist; asserted by
tools/check-no-pin-capture.sh). The Pay sheet reports that automation is
off and points the user at the M-Pesa app.
Use this for any build you intend to publish. AccessibilityService-driven USSD automation is an unresolved Google Play policy risk — enforcement is app removal and developer-account termination, and it is retroactive. See review item 5.2 and ADR 0007.
Containment is a packaging decision, not a default. Review item 0.1 asked for dispatch behind a compile-time flag; that flag exists and is exercised by CI in both directions. What changed is which way it points by default, so that ordinary development and device testing are not fighting it.
Native libraries (Linux)
Makepad needs system libraries to compile, and a few more to link a test binary:
./tools/makepad-native-libs.sh --check # report what is missing
./tools/makepad-native-libs.sh --install # opt-in, apt-based
Omitting the audio/SSL packages produces a confusing
unable to find library -lasound long after the compile appears to succeed.
Tests
TEST_TARGET=domain ./tools/test-rust-clean.sh
TEST_TARGET=storage ./tools/test-rust-clean.sh
TEST_TARGET=platform ./tools/test-rust-clean.sh
./tools/test-mpesa-store-clean.sh
cargo test -p nigig-pay-ui --lib
Still missing
These are the biggest gaps I see:
- ❌ Arc drawing tool
- ❌ Area/shell drawing tools (polygon → slab/surface)
- ❌ Chamfered slab tool
- ❌ Inclined UCS / arbitrary work plane
- ❌ True ray-cast picking (currently projection-based)
- ❌ 3D Revit-style axis bubble labels
- ❌ Polar tracking mode (45° independent of ortho)
- ❌ Grid snap step selector
- ❌ Auto-focus Direct Distance Entry (AutoCAD-style typing while drawing)
- ❌ Hover information tooltip
- ❌ Command-based undo/redo
- ❌ Async exporters
- ❌ SceneBuilder API
- ❌ Full removal of the legacy
ScenePartcompatibility layer
Architecturally
Compared to the original review, you've already completed roughly 80–90% of the major refactor:
- ✅ Scene graph
- ✅ Export abstraction
- ✅ Visitor pattern
- ✅ Cached geometry
- ✅ Modern workspace
- ✅ Tool system
- ✅ Construction aids
- ✅ Reference planes
- ✅ Multi-selection
- ✅ Properties editing
The remaining work is primarily CAD UX and editor polish, not core architecture.
What I'd prioritize next
- Implement the three remaining OSnaps (Perpendicular, Nearest, Intersection).
- Replace projection-based picking with true ray casting.
- Add Arc and Area drawing tools.
- Add an inclined (3-point) work plane/UCS.
- Finish the migration away from the legacy
ScenePartrepresentation. - Introduce a command-based undo/redo system.
- Add 3D axis bubbles and hover tooltips.
At this point, I would focus almost entirely on editor functionality rather than additional architectural refactoring, because the core architecture is already in good shape.
Refined priority order I'd suggest
#1 Exporter trait — pure refactor, no behavior change, unlocks STL/OBJ/SVG immediately.
#9 Visitor pattern — comes for free with #1, do them in one PR.
#7 + #2 Strong IDs + immutable CadScene — the foundation everything else needs.
#3 Mesh cache — only meaningful after #2.
#4 Incremental regeneration — only after profiling.
#5 Parallel mesh gen — only after Send/Sync audit of makepad_csg.
#6 Arena allocation — only if scene grows past ~10k nodes.
#10 Streaming execution — UX win, lower priority than perf.
#8 Builder API — ergonomic, do alongside #2.
#10 Command pattern (undo/redo) — important but separable from perf.
cad/
mod.rs — re-exports + module wiring only (~200 lines)
cad_scene.rs — (already split out)
arch_gltf.rs — (already split out)
arch_pdf.rs — (already split out)
cad_editor_sheet.rs — (already split out)
viewport.rs — CadViewport widget + 3D drawing + camera (~4k lines)
viewport_2d.rs — 2D plan view mode + projections (~1.5k lines)
tools.rs — CadTool enum + DrawingState + SnapSettings + tool dispatch (~2k lines)
script_bindings.rs — cad_script_mod() + Solid handle types + VM method registry (~1.5k lines)
commands.rs — CadCommand + undo/redo stack + the future `trait Command` (~500 lines)
persistence.rs — save/load + cad_store integration + path helpers (~500 lines)
scene_conversion.rs — parts_to_scene() + ScenePart::to_cad_node() bridge (~300 lines)
exporters.rs — export_floor_plan_pdf + export_3d_viewer + export_cli_script + bake entry points (~500 lines)
construction_geometry.rs — construction lines + points + measurement overlay (~500 lines)