Skip to content

prototype: Faris r2 corrections + DAO tier proposal form - #6

Merged
abullaisi merged 1 commit into
mainfrom
feat/prototype-faris-r2-dao-tiers
Jul 16, 2026
Merged

prototype: Faris r2 corrections + DAO tier proposal form#6
abullaisi merged 1 commit into
mainfrom
feat/prototype-faris-r2-dao-tiers

Conversation

@abullaisi

@abullaisi abullaisi commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Prototype-only changes (no packages/web, no landing artifact).

  • DAO proposal form on dao.html: 5 listing tiers (Freebies / Bronze / Silver / Gold / Platinum) with tier-locked platform share and live split validation; Freebies price-lock now clears when switching to a paid tier
  • Faris review r2 corrections: stepper strip removed from benefits.html (kept only on subscribe), progress bars restored on content + dashboard, traction.html now redirects to the DAO Traction tab, UNLOCKED badges quieted to ACCESS buttons
  • Fixed 70/20/10 copy replaced with DAO-governed split wording
  • SPEC.md synced with all of the above; Gold tier platform fee locked at 2% per the Canva flowchart

Verified click-through locally on the prototype server before push.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added DAO traction views with list and detail modes, tabs, proposal history, and proposal creation.
    • Added selectable membership tiers and editable distribution splits with validation.
    • Added content detail pages with progress tracking, completion, certificates, and activity history.
    • Updated access controls and library actions with clearer ACCESS buttons.
  • Improvements

    • Subscription confirmation now highlights DAO-governed on-chain splitting.
    • Traction navigation consistently opens the DAO experience.
    • Refined benefit and content status displays for improved clarity.

- dao.html: proposal form with 5 listing tiers (Freebies/Bronze/Silver/Gold/Platinum), tier-locked platform share, live split validation, Freebies price-lock clears on tier switch
- benefits.html: stepper strip removed, CTA re-routed to dao.html
- content.html + dashboard.html: progress bars restored
- traction.html: thin redirect to dao.html; full traction content lives in DAO Traction tab
- subscribe.html: split-card removed, keeps sole stepper
- UNLOCKED badges to quiet text + ACCESS buttons; DAO governance copy replaces fixed 70/20/10
- SPEC.md synced (Gold tier 2% platform fee confirmed from Canva flowchart)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stellar-hackathon-web Ready Ready Preview, Comment Jul 16, 2026 12:25pm

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The prototype updates subscription confirmation, content access, traction navigation, shared mock data, and DAO screens. Traction now routes to DAO detail views, while DAO proposals support tier-based fees and validated partner distributions.

Changes

Prototype flow overhaul

Layer / File(s) Summary
Shared navigation and status presentation
prototype/app.js, prototype/index.html, prototype/benefits.html, prototype/content.html, prototype/dashboard.html, prototype/ebook.html, prototype/partner.html
Asset versions and traction links are updated across prototype pages, unlocked indicators use content-meta, and subscription activity reflects DAO-governed splitting.
Subscription and content access flow
prototype/SPEC.md, prototype/subscribe.html, prototype/benefits.html, prototype/dashboard.html, prototype/partner.html, prototype/traction.html
The automatic split card is removed, confirmation copy is updated, content actions use ACCESS, and traction routes directly to dao.html.
DAO list, detail, and proposal workflows
prototype/SPEC.md, prototype/dao.html
DAO views support list/detail modes, tabbed panels, tier-based proposal fees, dynamic partner splits, 100% validation, and form reset behavior.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant dao.html
  participant KDATA
  Browser->>dao.html: Open DAO list or detail view
  dao.html->>KDATA: Read DAO packages, stats, payouts, and activity
  KDATA-->>dao.html: Return DAO mock data
  dao.html-->>Browser: Render DAO panels and tabs
  Browser->>dao.html: Select tier and edit partner split
  dao.html->>dao.html: Validate tier inputs and 100% total
  dao.html-->>Browser: Enable or disable proposal submission
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the prototype fixes and the new DAO tier proposal form.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/prototype-faris-r2-dao-tiers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@prototype/app.js`:
- Around line 125-128: Update the payout activity entries following the 10 USDC
Subscribe record to match the configured 45/30/15/10 DAO distribution: use the
correct recipients and corresponding payout amounts instead of the current
project-owner +7 USDC and community-manager +2 USDC values, while preserving the
existing activity structure.

In `@prototype/dao.html`:
- Around line 459-498: Update the partner selection and add-partner flows around
renderPartnerRows and the add-partner click handler to prevent duplicate
partnerIds in partnerRows. Reject or ignore selections already used by another
row, and disable or otherwise prevent adding a row when all KDATA.partners are
already assigned; preserve split validation only for unique beneficiaries.
- Around line 102-109: Update the DAO tab buttons in the sections identified by
data-tab and the corresponding tab group to expose their state: add
aria-controls targeting each panel and initialize aria-pressed to true only for
the active Profile tab. In the tab-switching logic, update aria-pressed whenever
the active panel changes, setting the selected tab true and all others false;
apply the same behavior to the additional tab group.

In `@prototype/SPEC.md`:
- Line 91: Update the contract identity instruction in SPEC.md to point to the
DAO Traction tab at dao.html?dao=<partner-id>, replacing the reference to
traction.html and keeping it consistent with the instructions on Lines 112 and
190.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2dd6a1cd-4595-44c2-aabe-cd9c61463e6f

📥 Commits

Reviewing files that changed from the base of the PR and between 4c4c517 and 4db9bb1.

📒 Files selected for processing (11)
  • prototype/SPEC.md
  • prototype/app.js
  • prototype/benefits.html
  • prototype/content.html
  • prototype/dao.html
  • prototype/dashboard.html
  • prototype/ebook.html
  • prototype/index.html
  • prototype/partner.html
  • prototype/subscribe.html
  • prototype/traction.html

Comment thread prototype/app.js
Comment on lines +125 to +128
{ kind: "Subscribe", detail: "10 USDC, split by DAO governance", addr: "GAJX…K3TQ", reward: "+10 USDC", when: "2m ago" },
{ kind: "Payout", detail: "to project owner", addr: "GDMV…HK2A", reward: "+7 USDC", when: "2m ago" },
{ kind: "Payout", detail: "to community manager", addr: "GDS7…M7FQ", reward: "+2 USDC", when: "2m ago" },
{ kind: "Subscribe", detail: "10 USDC split 7 / 2 / 1", addr: "GCRZ…9WLN", reward: "+10 USDC", when: "18m ago" },
{ kind: "Subscribe", detail: "10 USDC, split by DAO governance", addr: "GCRZ…9WLN", reward: "+10 USDC", when: "18m ago" },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Align payout activity with the new DAO split.

The 10 USDC subscription is still followed by the old +7 project-owner and +2 manager payouts. Update the recipients and amounts to represent the configured 45/30/15/10 distribution; otherwise the DAO Traction feed presents conflicting split data.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@prototype/app.js` around lines 125 - 128, Update the payout activity entries
following the 10 USDC Subscribe record to match the configured 45/30/15/10 DAO
distribution: use the correct recipients and corresponding payout amounts
instead of the current project-owner +7 USDC and community-manager +2 USDC
values, while preserving the existing activity structure.

Comment thread prototype/dao.html
Comment on lines +102 to +109
<section class="card" aria-labelledby="dao-tabs-label">
<div class="label section-label" id="dao-tabs-label">SECTIONS</div>
<div class="row tight" id="dao-tabs">
<button class="pill tab-btn active" type="button" data-tab="profile">Profile</button>
<button class="pill tab-btn" type="button" data-tab="packages">Packages</button>
<button class="pill tab-btn" type="button" data-tab="traction">Traction</button>
<button class="pill tab-btn" type="button" data-tab="proposals">Proposals</button>
</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Expose the active DAO section to assistive technology.

The visual active state is not announced. Add aria-controls/aria-pressed and update the latter when switching panels.

Proposed fix
-<button class="pill tab-btn active" type="button" data-tab="profile">Profile</button>
+<button class="pill tab-btn active" type="button" data-tab="profile"
+        aria-controls="tab-profile" aria-pressed="true">Profile</button>
 document.querySelectorAll(".tab-btn").forEach(function (b) {
-  b.classList.toggle("active", b === btn);
+  var active = b === btn;
+  b.classList.toggle("active", active);
+  b.setAttribute("aria-pressed", active ? "true" : "false");
 });

Also applies to: 337-343

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@prototype/dao.html` around lines 102 - 109, Update the DAO tab buttons in the
sections identified by data-tab and the corresponding tab group to expose their
state: add aria-controls targeting each panel and initialize aria-pressed to
true only for the active Profile tab. In the tab-switching logic, update
aria-pressed whenever the active panel changes, setting the selected tab true
and all others false; apply the same behavior to the additional tab group.

Comment thread prototype/dao.html
Comment on lines +459 to 498
function renderPartnerRows() {
var el = document.getElementById("split-partners");
el.innerHTML = partnerRows.map(function (row, index) {
var options = KDATA.partners.map(function (p) {
return '<option value="' + p.id + '"' + (p.id === row.partnerId ? " selected" : "") + '>' + escapeHtml(p.name) + '</option>';
}).join("");
return (
'<div class="row split-row" data-index="' + index + '">' +
'<label>Partner' +
'<select class="split-partner-select" data-index="' + index + '">' + options + '</select>' +
'</label>' +
'<label>%' +
'<input class="split-partner-pct" type="number" min="0" max="100" step="1" value="' + row.pct + '" data-index="' + index + '">' +
'</label>' +
'</div>'
);
}).join("");
}

document.getElementById("split-partners").addEventListener("input", function (event) {
var target = event.target;
if (!target.classList.contains("split-partner-pct")) return;
partnerRows[Number(target.getAttribute("data-index"))].pct = Number(target.value);
updateSplitFeedback();
});

document.getElementById("split-partners").addEventListener("change", function (event) {
var target = event.target;
if (!target.classList.contains("split-partner-select")) return;
partnerRows[Number(target.getAttribute("data-index"))].partnerId = target.value;
render();
});

document.getElementById("add-partner").addEventListener("click", function () {
var used = partnerRows.map(function (row) { return row.partnerId; });
var next = KDATA.partners.filter(function (p) { return used.indexOf(p.id) === -1; })[0] || KDATA.partners[0];
partnerRows.push({ partnerId: next.id, pct: 0 });
renderPartnerRows();
updateSplitFeedback();
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Reject duplicate partners in a distribution.

Selecting an existing partner—or clicking Add Partner after all partners are used—creates duplicate beneficiaries that still pass split validation.

Proposed fix
 var next = KDATA.partners.filter(function (p) {
   return used.indexOf(p.id) === -1;
-})[0] || KDATA.partners[0];
+})[0];
+if (!next) return;
 partnerRows.push({ partnerId: next.id, pct: 0 });
 var valid = values.every(function (value) {
   return Number.isFinite(value) && value >= 0 && value <= 100;
-}) && total === 100;
+});
+var partnerIds = partnerRows.map(function (row) { return row.partnerId; });
+var partnersUnique = new Set(partnerIds).size === partnerIds.length;
+valid = valid && total === 100 && partnersUnique;

Also applies to: 506-514

🧰 Tools
🪛 ast-grep (0.44.1)

[warning] 460-474: Avoid assigning untrusted data to innerHTML/outerHTML or document.write
Context: el.innerHTML = partnerRows.map(function (row, index) {
var options = KDATA.partners.map(function (p) {
return '<option value="' + p.id + '"' + (p.id === row.partnerId ? " selected" : "") + '>' + escapeHtml(p.name) + '';
}).join("");
return (
'

' +
'Partner' +
'' + options + '' +
'' +
'%' +
'' +
'' +
'
'
);
}).join("")
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').

(inner-outer-html)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@prototype/dao.html` around lines 459 - 498, Update the partner selection and
add-partner flows around renderPartnerRows and the add-partner click handler to
prevent duplicate partnerIds in partnerRows. Reject or ignore selections already
used by another row, and disable or otherwise prevent adding a row when all
KDATA.partners are already assigned; preserve split validation only for unique
beneficiaries.

Comment thread prototype/SPEC.md
- Split card (THE `.split-flow` card, only glow use): `.num-label` (`03 AUTOMATIC SPLIT`), one sentence: the Soroban contract splits every payment the moment it settles. Then 3 `.alloc-row`s from `KDATA.split`: name, `.alloc-pct` (70%, 20%, 10%), `.alloc-amt` (7 XLM, 2 XLM, 1 XLM), `.alloc-track` + `.alloc-fill` (width = pct, classes from `cls`).
- Contract line under the rows: `.hint` with contract `code` chip `shortAddr`-style (use `shortHash(KDATA.contractId)` or first/last chars) + `title` full id.
- **Revised 2026-07-16 (Faris round-2 review): the Automatic Split card is removed.** The pay flow ends at the subscription card and the tx status area. Fee shares are not shown as a fixed split on this screen; they are dynamic and set by each community's DAO (see Screen 8 below).
- Contract line: no longer shown on this screen (it lived on the removed split card). Contract identity now surfaces on traction.html.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Point contract identity to the DAO Traction tab.

traction.html is now redirect-only, so this instruction contradicts Lines 112 and 190. Specify dao.html?dao=<partner-id> and its Traction tab instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@prototype/SPEC.md` at line 91, Update the contract identity instruction in
SPEC.md to point to the DAO Traction tab at dao.html?dao=<partner-id>, replacing
the reference to traction.html and keeping it consistent with the instructions
on Lines 112 and 190.

@abullaisi
abullaisi merged commit 4db9bb1 into main Jul 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant