Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Jan 7, 2026

Automated PR to merge beta into production.

  • Created by GitHub Actions.
  • Triggers: push/schedule/workflow_run.

rbentcw and others added 3 commits January 6, 2026 09:42
Rotorsoft and others added 2 commits January 8, 2026 12:29
* first draft

* second pass

* Subscribe to markets

* Add Markets App Page

* updated markets display

* feat: add FLAG_MARKETS feature flag for prediction markets visibility

Completed GitHub issue #13265
- Added feature flag control for prediction markets UI visibility
- Updated governance_section.tsx to check markets flag for Markets menu item
- Updated AdminSection.tsx to check markets flag for Market Integrations menu
- Added FLAG_MARKETS documentation to .env.example with default value false

Files affected:
- packages/commonwealth/client/scripts/views/components/sidebar/governance_section.tsx
- packages/commonwealth/client/scripts/views/components/sidebar/AdminSection/AdminSection.tsx
- .env.example
- .ai/progress.txt

Tests: Pre-existing type/lint errors unrelated to this change. Manual verification required with FLAG_MARKETS=true/false.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>

* docs: update progress.txt with commit hash for issue #13265

* fix: resolve React Hooks error by converting Router to a component

Fixed "Rendered more hooks than during the previous render" error by:
- Converting Router from a function returning a router config to a React component
- Router now returns <RouterProvider> directly instead of just the router object
- Updated App.tsx to use <Router /> as a component instead of router()
- Moved useFlag('markets') hook to Router component where it's properly called
- Passed marketsEnabled as parameter to CommonDomainRoutes/CustomDomainRoutes

This ensures hooks are called at the top level of a React component, following
the Rules of Hooks and preventing the conditional hook call issue.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>

* docs: update progress.txt with React Hooks fix details

* feat: add backend validation for FLAG_MARKETS feature flag

Added backend enforcement of the FLAG_MARKETS feature flag to prevent
unauthorized access to markets functionality when disabled.

Changes:
- Added FLAG_MARKETS to backend config (libs/model/src/config.ts)
- Added config.MARKETS.ENABLED validation to GetMarkets query
- Added config.MARKETS.ENABLED validation to SubscribeMarket command
- Added config.MARKETS.ENABLED validation to UnsubscribeMarket command
- All endpoints now throw InvalidState error when flag is disabled

Security: This ensures markets API cannot be accessed even if users bypass
frontend controls by directly calling the API.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>

* docs: update progress.txt with backend validation details

* fix: add MARKETS to Zod schema validation in config

Added missing MARKETS configuration to the Zod schema validation.
This fixes the 'Cannot read properties of undefined (reading ENABLED)' error
when accessing config.MARKETS.ENABLED in the backend.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>

* docs: update progress.txt with config schema fix

* chore: apply prettier formatting

Applied automatic formatting changes from prettier across multiple files.
These are import reordering and formatting consistency changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>

* fix: resolve linting errors in market-related files

Fixed critical linting errors:
- Changed 'any' type to 'unknown' in polymarketApi.ts
- Added 'void' operator to floating promises in useMarketData.ts
- Removed unnecessary curly braces in Skeleton.tsx

Remaining warnings are pre-existing in market integration files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>

* fix: resolve polymarketApi type errors and enable FLAG_MARKETS in tests

Fixed TypeScript errors in polymarketApi.ts by using a type alias with
eslint-disable for the external API response type.

Updated market-lifecycle.spec.ts to set FLAG_MARKETS=true in beforeAll
hook so tests can run successfully with the feature flag validation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>

* fix: properly mock MARKETS.ENABLED config in unit tests

Changed from setting process.env.FLAG_MARKETS to using vi.spyOn() to mock
config.MARKETS.ENABLED. This follows the pattern used by other tests in the
codebase (e.g., bot-user-gating.spec.ts) and ensures the mock is applied
before the config is used by the test commands.

The environment variable approach doesn't work because the config is loaded
at module import time, before beforeAll() runs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>

---------

Co-authored-by: rotorsoft <[email protected]>
Co-authored-by: Malik Zulqurnain <[email protected]>
Co-authored-by: Claude Sonnet 4.5 <[email protected]>
* docs: removes duped instructions

* fix: slugs

---------

Co-authored-by: rotorsoft <[email protected]>
Rotorsoft and others added 4 commits January 8, 2026 17:17
…t design patterns (#13285)

* refactor: align betting markets admin components with community market design patterns

Completed GitHub issue #13274
- Refactored MarketSelector, MarketFilters, MarketCard, and MarketList components to match MarketsAppPage styling
- Replaced inline styles and native HTML elements with CW component kit components (CWText, CWButton, CWTag, CWTextInput, CWSelectList, CWCircleMultiplySpinner)
- Applied consistent light theme styling: white backgrounds, dark text, light borders matching MarketsAppPage
- Implemented proper empty state handling with descriptive CWText messages
- Updated grid layout to match MarketsAppPage responsive design (2 columns desktop, 1 mobile)
- Added proper status tag color coding and date formatting
- Created new SCSS files for MarketSelector and MarketFilters with consistent styling patterns

Files changed:
- packages/commonwealth/client/scripts/views/components/MarketIntegrations/* (all market integration components)
- packages/commonwealth/client/scripts/views/pages/CommunityManagement/Markets/MarketsPage.scss

Tests: All unit tests pass, no type errors in modified files, linting passes

🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>

* Add UI screenshots for PR #13285

---------

Co-authored-by: rotorsoft <[email protected]>
Co-authored-by: Claude Sonnet 4.5 <[email protected]>
* Filter spam in global activity feed

* Filter spam from recent comments query
* Add Conductor scripts for setup and run

* Wait for Postgres before migrations

* Make setup wait for Postgres reliably
* docs: add unit test and playwright requirements to ai workflow

* ignore screens

* add instructions to avoid adding screenshots to repo

---------

Co-authored-by: rotorsoft <[email protected]>
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.

4 participants