feat: Compare Apps view for cross-app keyword ranking#1
Open
onlyilkr wants to merge 1 commit intosemihcihan:mainfrom
Open
feat: Compare Apps view for cross-app keyword ranking#1onlyilkr wants to merge 1 commit intosemihcihan:mainfrom
onlyilkr wants to merge 1 commit intosemihcihan:mainfrom
Conversation
Enables users to compare multiple apps side-by-side across a chosen keyword set inside the ASO dashboard. Ranks are derived from the existing aso_keywords.ordered_app_ids top-200 lists so no schema changes are required and apps that do not explicitly track a keyword still show a rank when they appear in the global ordering. Highlights: - Compare entry point added next to the sidebar "Apps" heading - Live-updating matrix (rows = keywords, columns = apps) with rank, change delta, tier tint and per-cell tooltip states for "outside top 200", "not yet researched", and "not tracked by this app" - Custom keyword picker sourced from a union endpoint with coverage metadata (N/M apps tracked) and "tracked by all" toggle - App picker limited to 2-10 apps, keyword picker limited to 1-100 - localStorage persistence of last compare state (apps, keywords, sort) restored when reopening the view - Fullscreen toggle on the matrix (React portal to bypass fixed positioning inside the transformed app shell) with ESC to exit - Read-only endpoints: - GET /api/aso/compare/keywords (keyword universe) - POST /api/aso/compare/matrix (per-cell rank data) - Visual styling aligned with existing table/toolbar conventions (JetBrains Mono, 10px uppercase headers, 12px body text) Tests: 12 new unit tests in cli/db/app-compare.test.ts covering tracked/untracked cells, outside top-200, not-researched, empty ordered_app_ids, duplicate input deduplication, and country scoping. Full suite: 393 passing, typecheck clean, build clean. Docs: docs/aso-runtime-flows.md notes the new read-only endpoints and the compare-handlers boundary; README adds a feature bullet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Compare Apps view to the ASO dashboard so users can evaluate how multiple apps stack up against each other for a chosen set of keywords, side by side.
Context and discussion: #2
Problem
Today the dashboard only surfaces keyword popularity/difficulty/rank for a single selected app at a time. There is no way to ask questions like "Where do my three competitors and I stand on this keyword set?" or "Which keywords am I leading on vs. trailing?" without manually switching apps and mentally diffing columns.
Solution
A new compare mode, reachable from a Compare button next to the sidebar Apps heading. It presents a matrix (keywords × apps) with ranks, rank change deltas, rank-tier color bands, and clear distinctions between not tracked, outside top 200, and not yet researched.
Ranks are derived from the existing
aso_keywords.ordered_app_idstop-200 list, which means:Features
Implementation notes
GET /api/aso/compare/keywords— keyword universe with coverage metadata.POST /api/aso/compare/matrix— per-(app, keyword)cell data.json_eachto look up positions inordered_app_ids, mirroring the existing paged keyword handler.CompareViewcomponent +use-comparehook (universe fetch, matrix fetch, persistence).App.tsxgets a small button + conditional render — no structural rewrite.document.bodyto bypass a containing-block issue caused by an identitytransformon the app shell.Button,Input,Badge,Card) and aligns with the main keyword table's typography (10px uppercase headers, 12px body, JetBrains Mono throughout).Boundaries respected
keywordPipelineServiceorkeywordWriteRepository(compare is read-only).aso_keywords,app_keywords, or any other table schema.Test plan
npm run typecheck— cleannpm test -- --watchman=false— 393 passing (12 new incli/db/app-compare.test.ts)npm run build— builds CLI, MCP, and dashboard bundlesnode cli/dist/cli.js+ browser:Docs
docs/aso-runtime-flows.md— new read-only compare endpoints documented under Trigger Map and Boundary Ownership.README.md— added a one-line feature bullet.Scope
Explicitly out of scope for v1 (happy to scope these as follow-ups based on feedback):
Thanks for building this tool — happy to adjust scope, API shape, or integration approach based on your feedback.