Implement Responsive Client-Side Autoscaling - #90
Conversation
Greptile SummaryThis PR introduces responsive client-side autoscaling across server-side widget layout, generated HTML, and shared browser drivers, together with extensive widget documentation, sample applications, utility-library changes, and merged dependency work.
Confidence Score: 4/5The PR is not yet safe to merge because the session error formatter can misread variadic arguments and crash while handling an error. The new Files Needing Attention: centrallix-lib/src/mtsession.c
|
| Filename | Overview |
|---|---|
| centrallix/wgtr/apos.c | Refactors application positioning around responsive dimensions, flexibility, insets, and container geometry. |
| centrallix/htmlgen/ht_render.c | Updates generated-page assembly and shared rendering behavior for the revised widget and utility contracts. |
| centrallix-os/sys/js/htdrv_page.js | Revises page-wide client geometry, lifecycle, focus, loading, and responsive behavior. |
| centrallix-os/sys/js/htdrv_button.js | Consolidates browser behavior for text, image, and combined button variants. |
| centrallix-lib/src/qprintf.c | Reworks constrained formatting semantics and adds boolean and unsigned-long-long conversions with regression tests. |
| centrallix-lib/src/mtsession.c | Rewrites session error formatting but mishandles unsupported printf conversions, potentially crashing error paths. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
App[Application widget tree] --> Layout[Server autoscaling and layout]
Layout --> Render[HTML and client parameter generation]
Render --> Assets[Shared browser widget drivers]
Assets --> Client[Responsive interactive UI]
Client --> Resize[Viewport and container resize]
Resize --> Assets
Reviews (15): Last reviewed commit: "Merge branch 'master' into apos_autoscal..." | Re-trigger Greptile
Additional Comments (1)
int
ht_get_parent_w__INTERNAL(pWgtrNode widget)
{
if (thExcessiveRecursion())
{
mssError(1, "HTRND", "Resource exhaustion in ht_get_parent_w__INTERNAL");
return 0;
}
const int cached_value = widget->fl_parent_w;
if (cached_value != -1) return cached_value;
const pWgtrNode parent = widget->Parent;
if (!parent) return widget->fl_parent_w = 0;
const int parentWidth = parent->width;
return widget->fl_parent_w = (parentWidth >= 0)
? parentWidth - (parent->left + parent->right)
: ht_get_parent_w__INTERNAL(parent);
}Apply the same fix to Context Used: Rule from Why: This prevents sta... (source) |
|
@greptileai Can you rereview this and let me know if you have any other comments? Did I resolve your issues? |
|
@greptileai Can you rereview this and let me know if you have any other comments? Did I resolve your issues? |
|
@greptileai Can you rereview this and let me know if you have any other comments? Did I resolve your issues? |
|
|
|
Note: I'd recommend merging #97 before this PR so that I can handle the inevitable merge conflict. Also, I'm planning to do my own rereview of this code soon. |
|
I'm looking over this project again and it looks like there's a lot that I could improve by adding additonal error handling. |
|
@greptileai Please rereview this PR. |
|
@greptileai Please rereview this PR. |
|
@greptileai Please rereview this PR. |
|
I've concluded that I probably can't fix the table row detail issues mentioned in the initial PR comment, and help would be nice for some of the other listed issues as well. |
|
@greptileai Please rereview this PR anyway. |
|
@greptileai I think I've addressed your previous comments. Please rereview this PR. |
Add htrGetErrorHTMLMsg() to allow passing an error message for contexts where mssStringError() won't work.
# Conflicts: # centrallix-os/sys/js/htdrv_page.js # centrallix-os/sys/js/htdrv_window.js
# Conflicts: # centrallix-lib/src/qprintf.c # centrallix/htmlgen/htdrv_tab.c
This PR adds responsive client-side autoscaling to HTML UIs generated by Centrallix.
After extracting changes into #87, #88, #89, and removing a few minor/unnecessary changes; this PR is hopefully slightly more manageable.
Known Issues
widget/pane: resize action (testapps/kardia/modules/payroll/pay_form.app)widget/image: offset & scale actions (not used anywhere)widget/objcanvas: add_osrc_object()GitHub Relationships
sys_osmlWidget Driver #99qprintf()prints%and&inside skipped conditionals #140centrallix-libUtilities #130aposSpaceOutLines()divides by zero, breaking layout #136textareaWidget Breaks Child Rendering #150Dependent PRs must be reviewed and merged into
masterbefore this PR is reviewed to fix their changes appearing in the PR diff.widget.xmlFixesThis branch
masterGreptile Summary