11155 Commits
Author SHA1 Message Date
David RichardsonandGitHub 45741365f4 Merge pull request #3289 from enquora/IvarTest-fix-test-warnings
Include inline comment for IvarTest wrt warning
2026-08-20 22:02:46 -06:00
David Richardson 2c86863258 Include inline comment for IvarTest wrt warning
In this one case, a warning is the expected output and is the only viable way to test the case.
See inline comment at top of IvarTest.j for explanation.
2026-08-20 22:00:53 -06:00
David RichardsonandGitHub 8994806789 Merge pull request #3288 from enquora/CPSetTest-fix-test-warning
Fix static analysis warnings for unused iteration variables in Founda…
2026-08-20 21:23:40 -06:00
David Richardson e51f0df1a6 Fix static analysis warnings for unused iteration variables in Foundation tests
The `for...of` syntax tests in `CPSetTest` and `CPDictionaryTest` iterate over empty collections. This leaves the bound variables unread, which triggers the static analyzer and fails the zero-warning CI policy.

Standard Javascript idioms for handling blank identifiers (such as `_` or pure evaluation via `void`) are either unsupported or cause AST collisions within the Node.js parser. The variables are now explicitly evaluated using native Objective-J message sends. This registers a read operation for the analyzer, preserves the legacy parser's structural expectations, and ensures the runtime state remains pristine.
2026-08-20 21:21:56 -06:00
David RichardsonandGitHub a8a0c64a2a Merge pull request #3287 from enquora/_CPFontPanelPreviewView-address-build-warning
Clear _CPFontPanelPreviewView build warning
2026-08-20 20:15:40 -06:00
David Richardson 5449561fe2 Clear _CPFontPanelPreviewView build warning
CPFontPanel.j used _CPFontPanelPreviewView as an ivar type and instantiated it before its own @implementation, later in the same file, with no forward declaration. Added @class _CPFontPanelPreviewView, alongside the file's existing forward declarations.

This removes all build warnings.
2026-08-20 20:14:14 -06:00
David RichardsonandGitHub 073fae648e Merge pull request #3286 from enquora/CPTabStopType-clear-build-warning
Remove CPTabStopType build warning
2026-08-20 20:07:33 -06:00
David Richardson 6121caf75d Remove CPTabStopType build warning
CPParagraphStyle.j defined CPTabStopType's four constants directly, with a comment noting they were "missing" but no @typedef for the type itself.

_CPRTFParser.j uses CPTabStopType as an ivar type and imports CPParagraphStyle.j directly, so the fix belongs in the defining file.

Added the missing @typedef CPTabStopType, same pattern as CPRulerOrientation.
2026-08-20 20:05:38 -06:00
David RichardsonandGitHub 253d6669eb Merge pull request #3285 from enquora/CPRulerOrientation-address-build-warning
Address CPRulerOrientation build warning
2026-08-20 19:59:14 -06:00
David Richardson 533a1d46eb Address CPRulerOrientation build warning
CPRulerView.j declared CPRulerOrientation's constants directly,
with only a comment claiming it was a typedef.

No @typedef directive existed, so the type was unknown wherever used as an ivar or parameter type.

Added the missing @typedef CPRulerOrientation, matching the pattern already used for CPTextAlignment in CPText.j.
2026-08-20 19:57:35 -06:00
David RichardsonandGitHub f6d96bbf17 Merge pull request #3284 from enquora/CPTextTab-resolve-build-warnings
Add missing CPTextTab forward declaration in CPRulerView
2026-08-20 16:30:02 -06:00
David Richardson 52658b636a Add missing CPTextTab forward declaration in CPRulerView
CPRulerView.j referenced CPTextTab (isKindOfClass: and alloc/init) without a declaration.

Added @class CPTextTab; to resolve the symbol reference. A forward declaration was utilized rather than importing CPParagraphStyle.j to minimize dependency coupling, despite the absence of a circular import risk.

Resolves build warning.
2026-08-20 16:28:02 -06:00
David RichardsonandGitHub c32994af66 Merge pull request #3283 from enquora/_CPTableTextAttachment-resolve-build-warning
Fix build warnings in _CPTableTextAttachment
2026-08-20 15:35:15 -06:00
David Richardson a1ac821678 Fix build warnings in _CPTableTextAttachment
Replaced the CPTextView.j import with forward declarations for CPTextView and CPTextContainer (the latter previously reached via the removed import).

The previous import graph created a circular dependency (_CPTableTextAttachment.j -> CPTextView.j -> _CPRTFParser.j / _CPRTFProducer.j -> _CPTableTextAttachment.j).

This caused the legacy compiler to emit a class registration warning during clean builds, as the class was unregistered at the time of resolution. Incremental builds masked this warning via cached symbol tables.

Using forward declarations breaks the cycle and ensures warning-free clean and incremental builds.
2026-08-20 15:31:45 -06:00
David RichardsonandGitHub 548ed836a0 Merge pull request #3282 from enquora/CPScrollView-address-build-warnings
Remove CPScrollView build warning
2026-08-19 20:28:51 -06:00
David Richardson 78a0ebab6e Remove CPScrollView build warning
CPRulerView.j did not import CPScrollView.
A direct import would create a cycle, since CPScrollView.j already imports CPRulerView.j.
Added a forward declaration instead.
2026-08-19 20:23:33 -06:00
David RichardsonandGitHub 3aa053e7a8 Merge pull request #3280 from enquora/CPOutlineView-build-warnings-cleanup
Fix CPOutlineView build warnings and audit+improve CPTreeNode
2026-08-19 11:05:17 -06:00
David Richardson 7aebf371e9 Back out CPTreeNodeTest for addition under separate PR
GitHub CI uses existing CPTreeNodeTest and fails when new tests are included.

New tests must be added as a separate PR, independently of the changes in CPTreeNode.j
2026-08-19 10:31:15 -06:00
David Richardson ac8ce3eec3 Fix CPOutlineView build warnings and audit+improve CPTreeNode
CPOutlineView.j used CPTreeNode before AppKit.j imported it. This
triggered build warnings. This commit adds an import.

- Add @import "CPTreeNode.j" to CPOutlineView.j.

While addressing this warning, CPTreeNode was audited and found to have an algorithmic complexity regression and multiple structural inconsistencies in the KVO support code.

The test suite for CPTreeNode was Spartan in the extreme.

All of these have been addressed - see inline notes for details.
CPTreeNode is subject to further audit.
2026-08-19 10:11:20 -06:00
David RichardsonandGitHub 3b09a5bde6 Merge pull request #3277 from enquora/CPStackView-build-warnings-cleanup
Fix CPStackView compile errors and add minimal correctness fixes
2026-08-14 20:12:35 -06:00
David Richardson 01f7f9b601 Fix CPStackView compile errors and add minimal correctness fixes
CPStackView.j emited warnings during builds and tests which constituted
either real errors or indeterminate state.

These included four types that did not exist: CPUserInterfaceLayoutOrientation, CPLayoutAttribute,
CPEdgeInsets, and CPMapTable.

The missing types are now present.

- Add local typedefs for CPUserInterfaceLayoutOrientation and
  CPLayoutAttribute. Numeric values match the equivalent Cocoa
  constants.
- Add CPEdgeInsets as an alias for the existing CGInset struct.
  Add CPEdgeInsetsMake and CPEdgeInsetsEqualToEdgeInsets.
- Import Foundation/CPMapTable.j. CPMapTable already exists in
  Foundation.

This commit also fixes two logic errors found during review.

- arrangedSubviews did not match the true view order after
  insert or remove. Add _rebuildArrangedSubviews and call it
  from every method that changes view order.
- Trailing-gravity layout added one extra spacing gap past the
  last view. This shifted the returned layout boundary. Spacing
  is now added before each view, not after.

This commit adds one new property.

- Add a distribution property with storage and accessors. It
  has no effect on layout yet. This makes the property honest:
  before this change, the type existed but no property did.

The manual test, ./Tests/Manual/CPStackViewTest, used a Narwhal-era
Jakefile and would not build. This has been updated to reflect
usage under the Node toolchain.

This commit adds CPStackView.j to AppKit.j. The file was never
imported. Only the build script's wildcard file list included
it.

This commit adds a header comment to CPStackView.j. The comment
states that the class is a placeholder. It lists known
limitations. It states that a constraint-solver based
replacement is planned.

Why: CPStackView must compile and pass tests before capp-build
can use this tree as a build reference, and a class with unstated
limits invites misuse.
2026-08-14 20:09:17 -06:00
David RichardsonandGitHub 907ff374e6 Merge pull request #3273 from enquora/add-property-copy-test
Add test for @accessors(copy)
2026-08-13 16:51:51 -06:00
David Richardson a786418e19 Add test for @accessors(copy)
@accessors(copy) had no test in ./Tests.
The compiler's copy-accessor setter behaviour was unverified.

Add CopyAccessorTest.j to Tests/Objective-J. It asserts three
properties of the generated setter:
- the stored value is not identical to the assigned object
- the stored value is unaffected by later mutation of the original
- the stored value is equal in content to the original at assignment

This is added both as a matter of good coverage for the existing toolchain and so that new tooling has a reference for a piece of foundational behaviour.
2026-08-13 16:42:57 -06:00
daboe01andGitHub 6448f7ea12 Merge pull request #3272 from daboe01/pageunloadfix
replace unload event listener with pagehide
2026-08-13 14:16:09 +02:00
daboe01 ce2803f354 replace unload event listener with pagehide and add DOM safety checks 2026-08-12 16:58:12 +02:00
David RichardsonandGitHub 7e3d22b10e Merge pull request #3270 from enquora/CPMapTable-fix-build-warning
Fix legacy compiler warnings in CPMapTable
2026-08-12 07:50:43 -06:00
David Richardson 84dab55993 Fix legacy compiler warnings in CPMapTable
Using ES6 destructuring in the `for...of` loop declaration
(`var [key, value] of _map.entries()`) causes the legacy
Objective-J compiler to emit "uninitialized global variable"
warnings for `key` and `value`.

This raises concerns about variable scoping and generates
unacceptable noise in the CI pipeline. To resolve the warnings,
the loop has been restructured to use standard array indexing
inside the loop body.

A TODO has been added to revert to ES6 destructuring once the
legacy compiler is retired.
2026-08-11 13:04:05 -06:00
David RichardsonandGitHub 60a143eb7c Merge pull request #3268 from cappuccino/readme-aristo3-testing
Update README to reflect testing branch for the Aristo3 theme
2026-08-10 20:27:02 -06:00
David Richardson aa961ff518 Update README to reflect testing branch for the Aristo3 theme 2026-08-10 20:17:30 -06:00
David RichardsonandGitHub bbdc7e1fe1 Merge pull request #3266 from enquora/modernize-isNumeric-macro
Remove _IS_NUMERIC macro in favour of concrete function CPIsNumeric()

- Create Foundation/_CPFoundationUtilities.j to house global low-level utilities.
- Implement CPIsNumeric as a concrete JavaScript function, preserving the exact legacy logic.
- Import _CPFoundationUtilities.j in the Foundation.j umbrella manifest.
- Replace _IS_NUMERIC macro calls at all call sites with CPIsNumeric().
2026-08-05 13:50:00 -06:00
David Richardson b62721d79a Remove _IS_NUMERIC macro in favor of concrete funtion CPIsNumeric()
- Create Foundation/_CPFoundationUtilities.j to house global low-level utilities.
- Implement CPIsNumeric as a concrete JavaScript function, preserving the exact legacy logic.
- Import _CPFoundationUtilities.j in the Foundation.j umbrella manifest.
- Replace _IS_NUMERIC macro calls at all call sites with CPIsNumeric().
2026-08-05 13:47:28 -06:00
David RichardsonandGitHub 450db2678a Merge pull request #3265 from enquora/modernize-CPNumberFormatter-remove-cpp-directives
Foundation: remove preprocessor macro from CPNumberFormatter.j
2026-08-04 19:48:17 -06:00
David Richardson 02a5434e4f Foundation: remove preprocessor macro from CPNumberFormatter.j
Replace SET_NEEDS_NUMBER_HANDLER_UPDATE() with inline statements.
Add a comment at each of the 6 call sites to state the reason.
No behavior change.
2026-08-04 19:46:09 -06:00
David RichardsonandGitHub 51b10e2bc4 Merge pull request #3258 from enquora/modernize-CPTimer
Refactor CPTimer: Remove CPP dependencies and mark legacy anti-patterns
2026-08-04 19:09:46 -06:00
David RichardsonandGitHub 8cb3d7771c Merge pull request #3264 from enquora/modernize-_CPArray-cpp
refactor(foundation): expand placeholder redirection macro in CPArray
2026-08-04 18:42:58 -06:00
David Richardson 4ef40ff151 refactor(foundation): expand placeholder redirection macro in CPArray
Remove the pre-processor dependency on FORWARD_TO_CONCRETE_CLASS by  inlining the class cluster instantiation routing logic across all designated initializers to support the new Go-based toolchain architecture.
2026-08-04 18:40:57 -06:00
David RichardsonandGitHub d7e5c2ccac Merge pull request #3259 from enquora/modernize-CPNumber
Refactor CPNumber: Remove CPP macros and modernize syntax
2026-08-04 18:11:59 -06:00
David Richardson f414fae60a Replace tabs with spaces
Tab indentation inadvertenly applied previously.
2026-08-04 18:09:27 -06:00
David RichardsonandGitHub a6c57b7128 Merge pull request #3263 from enquora/modernize-CPException-inline-method-call-string
Refactor METHOD_CALL_STRING macro to Javascript function

Replace the unhygienic METHOD_CALL_STRING() C pre-processor macro 
in CPException.j with a standard JavaScript helper function, 
_CPMethodCallString().

Add a `// MARK: - Exception Utilities` navigation landmark. 

This removes a legacy text-substitution dependency, enabling 
single-pass AST generation for the native compilation pipeline.
2026-08-04 17:52:30 -06:00
David Richardson cbf1d35f24 Refactor METHOD_CALL_STRING macro to Javascript function
Replace the unhygienic METHOD_CALL_STRING() C pre-processor macro
in CPException.j with a standard JavaScript helper function,
_CPMethodCallString().

Add a `// MARK: - Exception Utilities` navigation landmark.

This removes a legacy text-substitution dependency, enabling
single-pass AST generation for the platform-native compilation pipeline.
2026-08-04 17:47:44 -06:00
David Richardson ecf36f12cb docs: Establish v1.5.0 baseline and direct legacy users to 1.4.0
Merge Aristo3 theme and make it default.
Update README to reflect transition to Cappuccino 2.
Change README extension from .markdown to .md for universal editor support.
v1.5.0
2026-08-04 15:00:41 -06:00
daboe01 fa79df4309 Merge remote-tracking branch 'upstream/main' 2026-07-25 19:22:16 +02:00
David Richardson d9d3e5d613 Refactor CPNumber: Remove CPP macros and modernize syntax
Key changes:
- Removed the `CAST_TO_INT` macro and replaced it with native ES6
  `Math.trunc()` for float truncation.
- Replaced `var` with `let` for proper block scoping.
- Simplified boolean coercion in `boolValue` using the `!!` operator.
- Replaced the hostile `throw new Error` in `descriptionWithLocale:`
  with a safe fallback to `self.toString()`.
- Added `FIXME` comments to explicitly document architectural
  anti-patterns, including the global mutable state in `CPNumberUIDs`
  and the unimplemented `decimalValue` method.
2026-07-23 16:37:06 -06:00
David Richardson a745af8ead Refactor CPTimer: Remove CPP dependencies and mark legacy anti-patterns
As part of the ongoing technical debt cleanup, this commit modernizes
CPTimer.j by removing its reliance on the C-preprocessor and updating
syntax to modern JavaScript standards.

Key changes:
- Replaced `#define CPTimerDefaultTimeInterval` with a native `const`.
- Replaced `var` with `const`/`let` for proper block scoping and immutability.
- Replaced the build-time `PLATFORM(DOM)` guard with a runtime
  `typeof(window) !== 'undefined'` check, ensuring Foundation does not
  depend on build-time platform flags.
- Added `FIXME` comments to explicitly document architectural anti-patterns:
  - The invasive global override of `window.setTimeout` and `window.setInterval`.
  - The use of `new Function` for string evaluation (CSP violation).
  - The questionable exposure of `CPTimerDefaultTimeInterval` as a fallback.
2026-07-23 15:26:31 -06:00
David RichardsonandGitHub 87c1727ea0 Merge pull request #3255 from enquora/modernize-pragma-mark
Replace objc directive with native Javascript version // MARK: to facilitate elimination of pre-processing pass.
2026-07-21 16:16:00 -06:00
David Richardson 1a9a42ff54 Replace #pragma mark with // MARK:
Replace objc directive with native Javascript version // MARK: to facilitate elimination of preproccsing pass.
2026-07-21 15:15:53 -06:00
David RichardsonandGitHub 5592056351 Merge pull request #3254 from enquora/cleanup-formatting
Cleanup formatting in CPSet class cluster.
Align variable declarations.
Convert Xcode landmarks from c preprocessor pragmas to objj-native // MARK:
2026-07-21 11:11:53 -06:00
David Richardson 98bfd87446 Convert Xcode code landmarks from Objective-C to native Javascript
While objc `#pragma mark` works in objj files, it requires a preprocessor to handle the directive.

// MARK: is the fully functional and correct Objective-J variant.
2026-07-21 11:05:11 -06:00
David Richardson 3f63be7290 Align variable declarations 2026-07-21 10:56:38 -06:00
daboe01andGitHub b23d0cb8eb Merge pull request #3251 from daboe01/ruleeditor-drag-fix
fixed: CPRuleEditor: crash when dragging nested compound rows
2026-07-11 14:24:54 +02:00