Skip to content

fix(volumes): make DataForSEO return usable numbers for niche prompts - #11

Merged
gkhngyk merged 1 commit into
mainfrom
fix/volumes-head-keywords-and-region
May 13, 2026
Merged

gkhngyk merged 1 commit into
mainfrom
fix/volumes-head-keywords-and-region

Conversation

@gkhngyk

@gkhngyk gkhngyk commented May 13, 2026

Copy link
Copy Markdown
Contributor

Two coupled bugs were combining to produce 0 across the entire prompt
volumes feature for niche / long-tail prompts:

  1. The keyword extraction system prompt asked for 2-5 word phrases
    and produced long-tail strings. Google Ads search_volume reports
    0 for queries it can't measure, which means everything below the
    head-term threshold disappeared. The new prompt explicitly asks
    for 1-3 word category-level head terms with worked examples
    showing the stripping of "best" / years / scenarios. Verified
    end-to-end: prompts that returned 0/mo before now return
    thousands/mo.

  2. UI never passed locationCode / languageCode to the analyze
    endpoint, and the route forwarded those undefined values straight
    through to DataForSEO. Google Ads needs a geo to estimate volume,
    so for any keyword on the edge of mainstream demand the answer
    defaulted to 0. The fix resolves DataForSEO codes from the
    brand's region / language on the server (analyze, analyze-batch,
    refresh) so the UI doesn't need to change. New region->location
    mapping lives in server/src/lib/dataforseo-codes.js (19 markets,
    13 languages mirrored from prompt-options config). Callers can
    still override by passing locationCode / languageCode explicitly
    in the request body.

Two coupled bugs were combining to produce 0 across the entire prompt
volumes feature for niche / long-tail prompts:

  1. The keyword extraction system prompt asked for 2-5 word phrases
     and produced long-tail strings. Google Ads search_volume reports
     0 for queries it can't measure, which means everything below the
     head-term threshold disappeared. The new prompt explicitly asks
     for 1-3 word category-level head terms with worked examples
     showing the stripping of "best" / years / scenarios. Verified
     end-to-end: prompts that returned 0/mo before now return
     thousands/mo.

  2. UI never passed locationCode / languageCode to the analyze
     endpoint, and the route forwarded those undefined values straight
     through to DataForSEO. Google Ads needs a geo to estimate volume,
     so for any keyword on the edge of mainstream demand the answer
     defaulted to 0. The fix resolves DataForSEO codes from the
     brand's region / language on the server (analyze, analyze-batch,
     refresh) so the UI doesn't need to change. New region->location
     mapping lives in server/src/lib/dataforseo-codes.js (19 markets,
     13 languages mirrored from prompt-options config). Callers can
     still override by passing locationCode / languageCode explicitly
     in the request body.
@vercel

vercel Bot commented May 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ansvisor Ready Ready Preview, Comment May 13, 2026 0:53am

Request Review

@gkhngyk
gkhngyk merged commit dca64e5 into main May 13, 2026
1 check passed
gkhngyk pushed a commit that referenced this pull request Nov 5, 2026
…ed and recommends 3 to 5 agents (AGENTS #11) (#2136)

The preset was Soon (needs: help_articles, setup_skill). It is now ready:
- a new /setup skill (Setup guide): a preset can't use the hidden /start
  playbook (a ready preset's skills are library skills, and an agent loads
  them with use_skill, which never offers a playbook);
- no trigger (Manual only, Run now), as Ready to Publish: the plan's
  triggers (a new brand or member) aren't kinds New agent offers;
- Ask me first: every change asks, as /start does.

/setup walks the open Getting started steps, then recommends 3 to 5
ready-to-use agents with a link to each card in Agent Center › Ready to
use. A new read tool, list_ready_agents, gives them by Ready to use's own
rule (recommendedPresets on filterPresets and presetFit): what fits the
brand's site type and the person's work areas first, up to 5, then the
launch set's to make 3. Never a Soon agent, never itself; it never turns
an agent on. Each card has an id, and a link to it brings it into view.

Help: chat/agents.md (Onboarding & Help), chat/skills.md (Setup guide,
twenty-two skills); approved-articles.json, catalog.json and library.json
regenerated.


Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9

Co-authored-by: Claude <[email protected]>
gkhngyk pushed a commit that referenced this pull request Nov 7, 2026
…(Onboarding & Help, 00483) (#2216)

* feat(chat): show a new member the agents for them on their Chat Home (Onboarding & Help, 00483)

"Agents for you" on Chat Home, the new member half of AGENTS plan #11
(owner decision: no agent run, no AI use). Once the person answered or
skipped Your work areas, in their first 14 days in the workspace (the
invitation they accepted, else the workspace maker's account), and until
they hide it, Home lists 3 to 5 ready-to-use agents from
recommendedPresets() for the open brand's site type and their work areas,
each with what it does and why it fits. Admins and Managers open its card
in Agent Center > Ready to use (#preset-{id}); everyone else (CHAT-21 §K
item 51) sees the cards with Ask your Admin.

Hide keeps chat_user_prefs.agents_for_you_dismissed_at (00483), saved as
home_seen_at is, so it stays hidden on every device. Help updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9

* test(chat): list hiding Agents for you as a person's own pref in the read-only coverage

dismissAgentsForYou writes only the person's own chat_user_prefs row, as
saveHomeSeen does, so it stays open while the workspace is read-only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9

* fix(chat): leave Agents for you off Chat Home's Default view, with its other blocks

#2183 (00485) starts everyone's Chat Home on a Default view that shows only
the greeting, one line and the box, and skips the reads it no longer shows.
Agents for you now sits with For you now and New for you: it shows where
Home has a focus, and isn't read on the Default view. Help (Use Chat, Choose
what Chat focuses on, Pick your work areas) says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(chat): show Agents for you on Chat Home's Default view too, for a new member only

Owner, 2026-11-06: a person new to the workspace, as Agents for you counts
one (Your work areas answered or skipped, in their first 14 days, until
they hide it), gets the section on the Default view as well, under the
greeting. Everyone else's Default view stays the greeting, one line, the
pill and the box.

- readAgentsForYouOpen: whether the section is open for the person, with
  no brand and no agents, shares readAgentsForYou's reads. The Chat page
  reads it with its other reads and hands ChatHome newMember.
- ChatHome reads the agents on the Default view only for that person; a
  focused Home reads them as before.
- Help (Use Chat, Choose what Chat focuses on, Pick your work areas) says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(chat): show the welcome card first and Agents for you once it is gone, one card at a time

Owner decision 2026-11-06: in the free trial and the demo, a new member
gets the tour's welcome card first; Agents for you waits, unread, until
Not now or the tour's end takes the card away.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: Cihan <[email protected]>

This branch was successfully deployed

1 active deployment
Preview — d53d41c1 Deployed May 13, 2026 by vercel[bot]
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