Skip to content

Polish Boss Swipe mini app#258

Merged
MagMueller merged 1 commit into
mainfrom
polish-boss-swipe-miniapp
May 20, 2026
Merged

Polish Boss Swipe mini app#258
MagMueller merged 1 commit into
mainfrom
polish-boss-swipe-miniapp

Conversation

@MagMueller
Copy link
Copy Markdown
Contributor

@MagMueller MagMueller commented May 20, 2026

Summary

  • Rework Agency concept Version 2 into a cleaner Boss Swipe flow with hidden lab chrome, daily objective progress, persistent swipe affordances, explicit option selection, and a separate Do it launch boundary
  • Make comments create/reuse a Telegram work lane before marking cards handled, so comment-before-start does not silently drop context
  • Enable the Mini App backend and tunnel at boot so /agency opens immediately after reboot

Tests

  • node --check agent/mini_app_static/concepts.js
  • /home/bux/.local/bin/ruff check agent/mini_app.py agent/test_mini_app.py
  • /opt/bux/venv/bin/python -m unittest agent.test_mini_app
  • git diff --check
  • Playwright screenshot + flow smoke for Version 2 at /tmp/agency-boss-swipe-v2-final-fixed.png

Summary by cubic

Polished the Boss Swipe mini app with a cleaner top-card-only swipe, a daily 3-approval meter, and an explicit “Do it” launch. Also enabled the Mini App server and tunnel at boot so /agency opens instantly after reboot.

  • New Features

    • Rebuilt Concept 2 into “Boss Swipe”: hidden lab chrome, swipe intent badges, a choice grid, and a separate Do it button; only the top card can be swiped.
    • Daily objective: shows approvals today (0/3) and open count with combo; XP only on Do it (skip gives no XP).
    • Card UI: category/source label, +XP badge, optional proof details, better media handling (ignores placeholder SVGs), and clear “Swipe or choose” cues.
    • Mini App backend and bux-miniapp tunnel now stay warm at boot for faster access.
  • Bug Fixes

    • Comments create/reuse a Telegram goal lane and keep the card pending; if lane setup fails, return 409 with an error (test tokens bypass for dev).
    • Selection logic ignores hidden “Skip” when choosing a variant; covered by a new Node-backed test.

Written for commit ee7239b. Summary will update on new commits. Review in cubic

@MagMueller MagMueller force-pushed the polish-boss-swipe-miniapp branch from 20b9574 to 18dc4c6 Compare May 20, 2026 00:28
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="agent/mini_app.py">

<violation number="1" location="agent/mini_app.py:2206">
P2: Dispatch failure returns 409 after reward already written. Card stays pending, so retries can farm duplicate comment points. Move reward/event writes behind successful dispatch, or compensate on failure.</violation>
</file>

<file name="agent/mini_app_static/concepts.js">

<violation number="1" location="agent/mini_app_static/concepts.js:929">
P2: Launch button can use hidden skip index. `Do it` should only send an index from visible non-skip choices.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread agent/mini_app.py
_append_event(suggestion_id, "comment", user, comment)
_record_quest_event(suggestion_id, "comment", user, points=45, detail=comment)
dispatched = _dispatch_card_context(row, comment, user)
if not dispatched and not _test_bot_token():
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot May 20, 2026

Choose a reason for hiding this comment

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

P2: Dispatch failure returns 409 after reward already written. Card stays pending, so retries can farm duplicate comment points. Move reward/event writes behind successful dispatch, or compensate on failure.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At agent/mini_app.py, line 2206:

<comment>Dispatch failure returns 409 after reward already written. Card stays pending, so retries can farm duplicate comment points. Move reward/event writes behind successful dispatch, or compensate on failure.</comment>

<file context>
@@ -2182,6 +2203,17 @@ def do_POST(self) -> None:
                     _append_event(suggestion_id, "comment", user, comment)
                     _record_quest_event(suggestion_id, "comment", user, points=45, detail=comment)
                     dispatched = _dispatch_card_context(row, comment, user)
+                    if not dispatched and not _test_bot_token():
+                        _json_response(
+                            self,
</file context>
Fix with Cubic

<button class="skip-move" data-action="skip" data-card-id="${card.id}" aria-label="Skip">×</button>
<button class="context-move" data-action="context" data-card-id="${card.id}">Comment</button>
<button class="voice-move" data-action="voice" data-card-id="${card.id}" aria-label="Speak">Mic</button>
<button class="launch-move" data-action="start" data-card-id="${card.id}" data-index="${selectedIndex(card)}">Do it</button>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot May 20, 2026

Choose a reason for hiding this comment

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

P2: Launch button can use hidden skip index. Do it should only send an index from visible non-skip choices.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At agent/mini_app_static/concepts.js, line 929:

<comment>Launch button can use hidden skip index. `Do it` should only send an index from visible non-skip choices.</comment>

<file context>
@@ -858,33 +858,80 @@ function renderStories(concept, cards, card) {
+        <button class="skip-move" data-action="skip" data-card-id="${card.id}" aria-label="Skip">×</button>
+        <button class="context-move" data-action="context" data-card-id="${card.id}">Comment</button>
+        <button class="voice-move" data-action="voice" data-card-id="${card.id}" aria-label="Speak">Mic</button>
+        <button class="launch-move" data-action="start" data-card-id="${card.id}" data-index="${selectedIndex(card)}">Do it</button>
+      </div>
+    </footer>
</file context>
Suggested change
<button class="launch-move" data-action="start" data-card-id="${card.id}" data-index="${selectedIndex(card)}">Do it</button>
<button class="launch-move" data-action="start" data-card-id="${card.id}" data-index="${(choices.find((button) => button.index === selectedIndex(card)) || choices[0] || { index: 0 }).index}">Do it</button>
Fix with Cubic

@MagMueller MagMueller force-pushed the polish-boss-swipe-miniapp branch from 18dc4c6 to ee7239b Compare May 20, 2026 00:41
@MagMueller MagMueller merged commit 0d50919 into main May 20, 2026
6 checks passed
@MagMueller MagMueller deleted the polish-boss-swipe-miniapp branch May 20, 2026 00:45
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