Skip to content

feat(content): assign, mark as a priority or hide a Content plan row - #1321

Merged
gkhngyk merged 8 commits into
ansvisor:mainfrom
cihan-gyk:feature/plan-row-menu
Oct 22, 2026
Merged

gkhngyk merged 8 commits into
ansvisor:mainfrom
cihan-gyk:feature/plan-row-menu

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

From the user's review of the live Plan: the Who column was always empty, since nothing on the Plan assigned work, and admins and managers had no way to remove a row or say which rows come first. Each Priority list row now has a "…" menu.

Assign to… (every member)

  • A row with a draft: a small dialog picks a teammate. The draft's Action Center task (Start's Team) goes to them. A draft not sent yet is sent first, as Team does.
  • A row without a draft: New content opens on Start for that row with Team chosen. Start's Team now has an "Assign to" picker (optional, "No one yet"), so the task it sends is assigned at once (assignAction). If that assignment fails, the task is still sent and a warning says to assign it in the Action Center.
  • Who column: shows the assignee's name when the draft's task has one. Before, it showed only You / Team / Agent.

Mark as priority / Remove priority (admins and managers)

  • Marked rows go to the top of the list with a Priority tag.
  • A fourth card, Priority ("Marked by your team"), counts the marked rows and filters to them.

Hide from the plan (admins and managers)

  • The row leaves the list and the card counts. A toast offers Undo.
  • "N hidden rows · Show" under the list opens them. Admins and managers can use Show again on each one.
  • Hiding an opportunity's row also dismisses the opportunity, so the Opportunities page agrees. Its status is remembered and given back on Show again.

Data: 00229_content_plan_marks.sql

  • New table content_plan_marks, keyed by (brand_id, row_key), using the keys the app already gives rows (opportunity:<id>, page:<host/path>).
  • Columns: priority, hidden_at, restore_status, updated_by.
  • Plan rows are built on each read, so marks need a table of their own.
  • RLS:
    • members of the brand's organization read;
    • admins and managers insert and update, with updated_by = auth.uid(), as the rule sets do (00214).
  • schema.sql is rebuilt.

getContentPlan also reads:

  • the marks;
  • hidden opportunities by id, since they are dismissed and no longer in the open list;
  • each draft's action assignee, via readAssignees.

New server actions: setPlanRowPriority, hidePlanRow, showPlanRow.

Stacked on #1320 (with #1319 merged in). Both touch the Plan page. Once they merge I'll merge main forward, and the diff here shrinks to this change.

Related issue

None. Product feedback from the user.

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

Apply 00229 first.

  1. Content → Plan, as an admin or manager: open a row's "…". It offers Assign to…, Mark as priority and Hide from the plan.
  2. Mark as priority: the row moves to the top with a Priority tag, and the Priority card counts 1. Clicking the card filters to it. Remove priority takes the mark off.
  3. Hide from the plan on an opportunity row:
    • the row leaves the list and the counts, and a toast offers Undo;
    • the opportunity is now Dismissed on the Opportunities page;
    • "1 hidden row · Show" → Show again brings the row back with its earlier status.
  4. Assign to… on a row without a draft: New content opens on Start with Team chosen and an Assign to picker. Send → the Action Center task is assigned to that person, and the Who column shows their name (on wide windows, ≥1280 px).
  5. Assign to… on a row with a draft: pick a teammate → Assign.
  6. As a member (not admin or manager): the menu shows only Assign to…, and hidden rows have no Show again.

Checked in light and dark, at 1024 px and wider.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

yarn test passes: 281 files, 2,497 tests. yarn build passes with CI's placeholders. bash supabase/build-schema.sh was run.

🤖 Generated with Claude Code

cihan-gyk and others added 5 commits October 21, 2026 21:39
…e in its final layout

- "What AI cites in your topics" drew both shares on one track scaled to
  AI's largest share, so a type the brand leans on more than AI does
  (e.g. 35% · 73%) ran its bar past the track onto the shares column. The
  two shares are now two thin bars on one scale, the larger of the two,
  never past the track.
- The list and the sections above it (AI results, the mix) were read and
  drawn apart, so the list showed mid-screen first and jumped down when
  the sections came in. The page now shows one spinner until both reads
  are in; a list that fails says so at once.

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

More of the brand's pages cited for the same prompts is no loss (AI
answers aren't a ranking), so neither Start nor the Plan treats it as a
problem any more:

- Start's "Overlap check" is an "Overview": a plain box listing the
  brand's pages AI already cites for these prompts, with no amber warning,
  no "Safe to create" and no "Recommended". The action the person clicked
  stays chosen (Create stays Create); the choices are the plan's page when
  it named one, a new page, and optimizing the page cited most.
- The Plan drops the Overlaps card, the ⚠ Overlap tag on rows, and the
  rows that were listed only because another page of the brand is cited
  for the same prompts.

content_plan_pages (00220/00221) still returns overlaps; the Plan no
longer reads it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each Priority list row gets a "…" menu:
- Assign to… (every member): a row with a draft assigns its Action
  Center task (sending the draft first when needed); a row without one
  opens Start on Team, which now has an "Assign to" picker. The Who
  column shows the assignee.
- Mark as priority (admins and managers): the row goes to the top with a
  Priority tag; a Priority card counts and filters the marked rows.
- Hide from the plan (admins and managers): the row leaves the list, with
  Undo and "N hidden rows · Show"; an opportunity's row also dismisses the
  opportunity and gets its status back when shown again.

Migration 00229 adds content_plan_marks (members read; admins and
managers write).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the needs-migration Adds or edits a migration — apply it to the hosted database label Oct 21, 2026
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk This is item C of the Plan feedback: a "…" menu on each Priority list row (Assign to…, Mark as priority, Hide from the plan).

  • Migration 00229_content_plan_marks.sql: one new table, with members reading and admins/managers writing (same pattern as 00214). Please apply it before the web deploy, since getContentPlan reads the table. It's applied on the dev DB.
  • Stacked: on fix(content): show the brand's cited pages as an Overview, not an overlap warning #1320, with fix(content): draw the Plan's mix bars to one scale, and open the page in its final layout #1319 merged in, because all three touch the Plan page. Once they merge, I'll merge main forward and the diff shrinks to this change.
  • Hiding an opportunity's row dismisses the opportunity through updateOpportunityStatus, so the Opportunities page agrees. The earlier status is kept in restore_status and given back on "Show again". This was the user's call; tell me if you'd rather keep the two separate.
  • Assigning reuses assignAction. Start's Team assigns right after sendContentDraftToActionCenter, so no server change was needed.

Checks: web 281 files / 2,497 tests, lint, typecheck, format and build all green. Checked in light and dark, and at 1024 px, 1280 px and 1440 px with no horizontal scroll.

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A few fixes before merge (reviewed 19ed52ba on top of #1319/#1320; the merge commit 6f46e186 is a clean merge):

  1. web/src/lib/actions/content-plan.ts:235 and :274: hidePlanRow / showPlanRow take opportunityId separately from rowKey. The mark is written under rowKey, but the status change goes to whatever id the client sends. The server's status endpoint only checks membership, so a stale or mismatched call can dismiss one opportunity and later give another opportunity the first one's restore_status. Derive the id from the key on the server and drop the parameter: rowKey.startsWith(OPPORTUNITY_KEY) ? rowKey.slice(OPPORTUNITY_KEY.length) : null, checked with z.guid().
  2. web/src/lib/actions/content-plan.ts:307: Show again restores restore_status whatever happened since. If someone completed the opportunity, or reopened it from the Opportunities page, while the row was hidden, this puts it back to new / reviewed. The hidden read at :131 has the same gap: it takes any status, so a completed opportunity shows up under hidden rows. Read hidden ids with .eq('status', 'dismissed'). In showPlanRow, restore only when the opportunity is still dismissed; otherwise just clear the mark.
  3. web/src/app/[locale]/(dashboard)/dashboard/content/plan/page.tsx:62: the Priority card's dot is violet. Draw it in ink (bg-foreground) to match the outline Priority badge.

Note: getContentPlan throws when content_plan_marks is missing (content-plan.ts:90). Apply 00229 before this merges, or the Plan stops loading for everyone. The 00229 policies follow content_rule_sets (00214): members read, admins and managers insert and update with updated_by = auth.uid(), and there is no delete policy. The table is keyed on (brand_id, row_key), which covers the read.

cihan-gyk and others added 2 commits October 22, 2026 12:02
# Conflicts:
#	supabase/schema.sql
#	web/messages/en.json
#	web/src/app/[locale]/(dashboard)/dashboard/content/plan/_plan-insights.tsx
#	web/src/app/[locale]/(dashboard)/dashboard/content/plan/page.test.tsx
#	web/src/app/[locale]/(dashboard)/dashboard/content/plan/page.tsx
#	web/src/components/content/new-content-dialog.test.tsx
#	web/src/lib/content/plan.test.ts
#	web/src/lib/content/plan.ts
… only what is still dismissed

hidePlanRow and showPlanRow no longer take an opportunity id from the client:
the server reads it from the row key the mark is written under (a uuid, or
'invalid'). Show again gives an opportunity back its status only while it
is still dismissed; one completed or reopened elsewhere keeps its status and
only the mark goes. Hidden rows read only dismissed opportunities. The
Priority card's dot is in ink, as its outline badge.

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

Copy link
Copy Markdown
Collaborator Author

@gkhngyk Thanks, all three are in a4101397, on top of a merge of main (38e216cb):

  1. The opportunity comes from the row key. hidePlanRow(brandId, rowKey) / showPlanRow(brandId, rowKey) no longer take an opportunityId. The server reads it from the key (opportunityIdOf), checked with z.guid(), so an opportunity key without a uuid is invalid. The hidden-row read uses the same helper and skips a key that isn't a uuid.
  2. Show again only restores what is still dismissed. showPlanRow clears the mark, then reads the opportunity's status and restores restore_status only when it is still dismissed; a completed or reopened one keeps its status. The hidden read adds .eq('status', 'dismissed'). Tests cover both, and the invalid key.
  3. The Priority card's dot is bg-foreground.

Merge with main. #1319/#1320/#1330 landed as squashes, so the default merge base re-applied their original commits. I resolved with this PR's own commit's parent (6f46e186) as the base. Every file this PR doesn't touch now matches main exactly, and schema.sql is rebuilt (00229 sits between 00228 and 00232).

Web: format, lint, tsc, 2,514 tests and the build pass. Tried in the browser: hiding an opportunity's row dismissed it with restore_status new, and Show again put it back to new.

As you noted, 00229 needs to be on the hosted database before this merges.

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good now (re-reviewed a4101397). 38e216cb is a clean merge of main: on top of main it adds exactly 19ed52ba, with nothing else.

Earlier items:

  1. Done. hidePlanRow and showPlanRow read the opportunity from the row key (web/src/lib/actions/content-plan.ts:55, :216). An opportunity key without a uuid is refused, and the status read is scoped to the brand.
  2. Done. Hidden rows read only opportunities still dismissed (:141). Show again restores restore_status only while the opportunity is still dismissed (:329); otherwise it only clears the mark. Tests cover both cases.
  3. Done. The Priority dot is bg-foreground (page.tsx:62).

It merges cleanly on main. Apply 00229 on prod before merging: it isn't there yet, and getContentPlan throws without content_plan_marks (content-plan.ts:98).

Tested on top of the current main together with #1343, #1344, #1321, #1329, #1332, #1334 and #1342: web and server tests, tsc, lint and Prettier pass, and schema.sql matches a rebuild. 00229, 00234 and 00238 are applied on production.

@gkhngyk
gkhngyk merged commit 3993c6c into ansvisor:main Oct 22, 2026
1 check passed
gkhngyk added a commit that referenced this pull request Oct 22, 2026
)

* fix(content): draw the Plan's mix bars to one scale, and open the page in its final layout

- "What AI cites in your topics" drew both shares on one track scaled to
  AI's largest share, so a type the brand leans on more than AI does
  (e.g. 35% · 73%) ran its bar past the track onto the shares column. The
  two shares are now two thin bars on one scale, the larger of the two,
  never past the track.
- The list and the sections above it (AI results, the mix) were read and
  drawn apart, so the list showed mid-screen first and jumped down when
  the sections came in. The page now shows one spinner until both reads
  are in; a list that fails says so at once.

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

* fix(content): show the brand's cited pages as an Overview, not an overlap warning

More of the brand's pages cited for the same prompts is no loss (AI
answers aren't a ranking), so neither Start nor the Plan treats it as a
problem any more:

- Start's "Overlap check" is an "Overview": a plain box listing the
  brand's pages AI already cites for these prompts, with no amber warning,
  no "Safe to create" and no "Recommended". The action the person clicked
  stays chosen (Create stays Create); the choices are the plan's page when
  it named one, a new page, and optimizing the page cited most.
- The Plan drops the Overlaps card, the ⚠ Overlap tag on rows, and the
  rows that were listed only because another page of the brand is cited
  for the same prompts.

content_plan_pages (00220/00221) still returns overlaps; the Plan no
longer reads it.

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

* feat(content): assign, mark as a priority or hide a Content plan row

Each Priority list row gets a "…" menu:
- Assign to… (every member): a row with a draft assigns its Action
  Center task (sending the draft first when needed); a row without one
  opens Start on Team, which now has an "Assign to" picker. The Who
  column shows the assignee.
- Mark as priority (admins and managers): the row goes to the top with a
  Priority tag; a Priority card counts and filters the marked rows.
- Hide from the plan (admins and managers): the row leaves the list, with
  Undo and "N hidden rows · Show"; an opportunity's row also dismisses the
  opportunity and gets its status back when shown again.

Migration 00229 adds content_plan_marks (members read; admins and
managers write).

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

* feat(content): suggest opportunity content types by the brand's site type

Content Opportunities gave every brand the same ten asset types, so a
shop could get a glossary or landing page and a SaaS brand a product or
category page. The generator now reads brands.site_type (or the
editor's guess from Shopping mode and industry), lists that site's page
types with their formats in the prompt, and limits assetType and the
supporting types to them, plus the earned third_party_article and
backlink. No calculation changes.

Older opportunities keep their stored types and are read as the brand's
page types (pillar_guide -> guide / buying_guide, landing_page ->
solution_page / collection_page / destination_page, and so on). The
opportunities list, the drawer, the assets card and Copy All Data name
them with the editor's labels. Start preselects an opportunity's type
for a new page; an existing page goes by its own address or title
first. The Content Plan follows the same rules.

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

* feat(content): open the Content Editor from Content Opportunities

From the user's spec, PR B of the Content Editor entry points, with the
user's follow-up choices:

- Opportunity panel: three buttons in front, in this order: Send to
  Actions, Generate Brief and Send to Editor. Each turns into its done
  state in place (Open in Actions, Brief Generated, Open draft). The
  rest move into a "..." menu on the right: Send to Plan, Another angle,
  Send to Workflow, Copy All Data, Mark as reviewed, Restore, Dismiss.
- Opportunities list: a row's actions sit in one "..." menu: Send to
  Editor or Open draft, Send to Plan or Open in Plan, Send to Workflow,
  Open in new tab, Dismiss. The Actions column narrows to fit.
- Send to Editor opens New content > Start. A create decision starts a
  new page; any other decision starts on its first target page
  (lib/content/opportunity-start.ts). Owned work still open only.
  getOpportunityDrafts finds the draft already being written.
- Send to Plan marks the opportunity's Plan row as a priority
  (content_plan_marks, #1321) for admins and managers;
  getPlanPriorities reads which rows already are.

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

* fix(content): read a Plan row's opportunity from its key, and restore only what is still dismissed

hidePlanRow and showPlanRow no longer take an opportunity id from the client:
the server reads it from the row key the mark is written under (a uuid, or
'invalid'). Show again gives an opportunity back its status only while it
is still dismissed; one completed or reopened elsewhere keeps its status and
only the mark goes. Hidden rows read only dismissed opportunities. The
Priority card's dot is in ink, as its outline badge.

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

* fix(content): keep a failed draft read from offering Send to Editor, and tell the list about Send to Plan

- A failed getOpportunityDrafts is no "no draft": the row menu and the
  panel offer "Couldn't check for a draft · Retry" instead of Start, so a
  failed read never starts a second draft for the same opportunity.
- Send to Plan from the panel calls the page's onPrioritized, so the row's
  menu says Open in Plan without a reload.
- Start's page types come from the opportunity's brand, not the active one.
- content.send is gone; content.alternative.hint is Another angle's title.
- Drop the unused contains mock and fix the content prop's doc.

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

---------

Co-authored-by: Cihan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Gökhan Geyik <[email protected]>
gkhngyk added a commit that referenced this pull request Oct 22, 2026
…ut (#1342)

* fix(content): draw the Plan's mix bars to one scale, and open the page in its final layout

- "What AI cites in your topics" drew both shares on one track scaled to
  AI's largest share, so a type the brand leans on more than AI does
  (e.g. 35% · 73%) ran its bar past the track onto the shares column. The
  two shares are now two thin bars on one scale, the larger of the two,
  never past the track.
- The list and the sections above it (AI results, the mix) were read and
  drawn apart, so the list showed mid-screen first and jumped down when
  the sections came in. The page now shows one spinner until both reads
  are in; a list that fails says so at once.

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

* fix(content): show the brand's cited pages as an Overview, not an overlap warning

More of the brand's pages cited for the same prompts is no loss (AI
answers aren't a ranking), so neither Start nor the Plan treats it as a
problem any more:

- Start's "Overlap check" is an "Overview": a plain box listing the
  brand's pages AI already cites for these prompts, with no amber warning,
  no "Safe to create" and no "Recommended". The action the person clicked
  stays chosen (Create stays Create); the choices are the plan's page when
  it named one, a new page, and optimizing the page cited most.
- The Plan drops the Overlaps card, the ⚠ Overlap tag on rows, and the
  rows that were listed only because another page of the brand is cited
  for the same prompts.

content_plan_pages (00220/00221) still returns overlaps; the Plan no
longer reads it.

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

* feat(content): assign, mark as a priority or hide a Content plan row

Each Priority list row gets a "…" menu:
- Assign to… (every member): a row with a draft assigns its Action
  Center task (sending the draft first when needed); a row without one
  opens Start on Team, which now has an "Assign to" picker. The Who
  column shows the assignee.
- Mark as priority (admins and managers): the row goes to the top with a
  Priority tag; a Priority card counts and filters the marked rows.
- Hide from the plan (admins and managers): the row leaves the list, with
  Undo and "N hidden rows · Show"; an opportunity's row also dismisses the
  opportunity and gets its status back when shown again.

Migration 00229 adds content_plan_marks (members read; admins and
managers write).

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

* feat(content): suggest opportunity content types by the brand's site type

Content Opportunities gave every brand the same ten asset types, so a
shop could get a glossary or landing page and a SaaS brand a product or
category page. The generator now reads brands.site_type (or the
editor's guess from Shopping mode and industry), lists that site's page
types with their formats in the prompt, and limits assetType and the
supporting types to them, plus the earned third_party_article and
backlink. No calculation changes.

Older opportunities keep their stored types and are read as the brand's
page types (pillar_guide -> guide / buying_guide, landing_page ->
solution_page / collection_page / destination_page, and so on). The
opportunities list, the drawer, the assets card and Copy All Data name
them with the editor's labels. Start preselects an opportunity's type
for a new page; an existing page goes by its own address or title
first. The Content Plan follows the same rules.

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

* feat(content): open the Content Editor from Content Opportunities

From the user's spec, PR B of the Content Editor entry points, with the
user's follow-up choices:

- Opportunity panel: three buttons in front, in this order: Send to
  Actions, Generate Brief and Send to Editor. Each turns into its done
  state in place (Open in Actions, Brief Generated, Open draft). The
  rest move into a "..." menu on the right: Send to Plan, Another angle,
  Send to Workflow, Copy All Data, Mark as reviewed, Restore, Dismiss.
- Opportunities list: a row's actions sit in one "..." menu: Send to
  Editor or Open draft, Send to Plan or Open in Plan, Send to Workflow,
  Open in new tab, Dismiss. The Actions column narrows to fit.
- Send to Editor opens New content > Start. A create decision starts a
  new page; any other decision starts on its first target page
  (lib/content/opportunity-start.ts). Owned work still open only.
  getOpportunityDrafts finds the draft already being written.
- Send to Plan marks the opportunity's Plan row as a priority
  (content_plan_marks, #1321) for admins and managers;
  getPlanPriorities reads which rows already are.

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

* feat(content): show the Plan's Priority Score, and how it is worked out

A Priority Score column beside the rank shows each row's 0-100 score as the
Action Center's badge does (level by colour, its name on wide windows). On
hover or focus it says what the score is made of: the opportunity's own
score, a drop's base and points, or a top page's citations. The calculation
and the order don't change. The table still fits at 1024 px.

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

* fix(content): read a Plan row's opportunity from its key, and restore only what is still dismissed

hidePlanRow and showPlanRow no longer take an opportunity id from the client:
the server reads it from the row key the mark is written under (a uuid, or
'invalid'). Show again gives an opportunity back its status only while it
is still dismissed; one completed or reopened elsewhere keeps its status and
only the mark goes. Hidden rows read only dismissed opportunities. The
Priority card's dot is in ink, as its outline badge.

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

* fix(content): keep a failed draft read from offering Send to Editor, and tell the list about Send to Plan

- A failed getOpportunityDrafts is no "no draft": the row menu and the
  panel offer "Couldn't check for a draft · Retry" instead of Start, so a
  failed read never starts a second draft for the same opportunity.
- Send to Plan from the panel calls the page's onPrioritized, so the row's
  menu says Open in Plan without a reload.
- Start's page types come from the opportunity's brand, not the active one.
- content.send is gone; content.alternative.hint is Another angle's title.
- Drop the unused contains mock and fix the content prop's doc.

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

---------

Co-authored-by: Cihan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Gökhan Geyik <[email protected]>
gkhngyk pushed a commit that referenced this pull request Oct 22, 2026
* fix(content): draw the Plan's mix bars to one scale, and open the page in its final layout

- "What AI cites in your topics" drew both shares on one track scaled to
  AI's largest share, so a type the brand leans on more than AI does
  (e.g. 35% · 73%) ran its bar past the track onto the shares column. The
  two shares are now two thin bars on one scale, the larger of the two,
  never past the track.
- The list and the sections above it (AI results, the mix) were read and
  drawn apart, so the list showed mid-screen first and jumped down when
  the sections came in. The page now shows one spinner until both reads
  are in; a list that fails says so at once.

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

* fix(content): show the brand's cited pages as an Overview, not an overlap warning

More of the brand's pages cited for the same prompts is no loss (AI
answers aren't a ranking), so neither Start nor the Plan treats it as a
problem any more:

- Start's "Overlap check" is an "Overview": a plain box listing the
  brand's pages AI already cites for these prompts, with no amber warning,
  no "Safe to create" and no "Recommended". The action the person clicked
  stays chosen (Create stays Create); the choices are the plan's page when
  it named one, a new page, and optimizing the page cited most.
- The Plan drops the Overlaps card, the ⚠ Overlap tag on rows, and the
  rows that were listed only because another page of the brand is cited
  for the same prompts.

content_plan_pages (00220/00221) still returns overlaps; the Plan no
longer reads it.

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

* feat(content): assign, mark as a priority or hide a Content plan row

Each Priority list row gets a "…" menu:
- Assign to… (every member): a row with a draft assigns its Action
  Center task (sending the draft first when needed); a row without one
  opens Start on Team, which now has an "Assign to" picker. The Who
  column shows the assignee.
- Mark as priority (admins and managers): the row goes to the top with a
  Priority tag; a Priority card counts and filters the marked rows.
- Hide from the plan (admins and managers): the row leaves the list, with
  Undo and "N hidden rows · Show"; an opportunity's row also dismisses the
  opportunity and gets its status back when shown again.

Migration 00229 adds content_plan_marks (members read; admins and
managers write).

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

* feat(content): suggest opportunity content types by the brand's site type

Content Opportunities gave every brand the same ten asset types, so a
shop could get a glossary or landing page and a SaaS brand a product or
category page. The generator now reads brands.site_type (or the
editor's guess from Shopping mode and industry), lists that site's page
types with their formats in the prompt, and limits assetType and the
supporting types to them, plus the earned third_party_article and
backlink. No calculation changes.

Older opportunities keep their stored types and are read as the brand's
page types (pillar_guide -> guide / buying_guide, landing_page ->
solution_page / collection_page / destination_page, and so on). The
opportunities list, the drawer, the assets card and Copy All Data name
them with the editor's labels. Start preselects an opportunity's type
for a new page; an existing page goes by its own address or title
first. The Content Plan follows the same rules.

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

* feat(content): open the Content Editor from Content Opportunities

From the user's spec, PR B of the Content Editor entry points, with the
user's follow-up choices:

- Opportunity panel: three buttons in front, in this order: Send to
  Actions, Generate Brief and Send to Editor. Each turns into its done
  state in place (Open in Actions, Brief Generated, Open draft). The
  rest move into a "..." menu on the right: Send to Plan, Another angle,
  Send to Workflow, Copy All Data, Mark as reviewed, Restore, Dismiss.
- Opportunities list: a row's actions sit in one "..." menu: Send to
  Editor or Open draft, Send to Plan or Open in Plan, Send to Workflow,
  Open in new tab, Dismiss. The Actions column narrows to fit.
- Send to Editor opens New content > Start. A create decision starts a
  new page; any other decision starts on its first target page
  (lib/content/opportunity-start.ts). Owned work still open only.
  getOpportunityDrafts finds the draft already being written.
- Send to Plan marks the opportunity's Plan row as a priority
  (content_plan_marks, #1321) for admins and managers;
  getPlanPriorities reads which rows already are.

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

* feat(content): export an opportunity as CSV, Excel or Word

The user asked for an Export button on the opportunity's full page and in
the right-hand panel, listing Export CSV, Export Excel and Export Word one
under the other. It sits on the actions row, left of the "..." menu.

All three formats come from what Copy All Data copies.
opportunityToMarkdown now renders a structured write-up
(opportunityDocument: sections of fields, items, numbered steps and
text), and its Markdown output is unchanged. lib/content/opportunity-export.ts
writes that same write-up as:
- CSV: section, field and value rows, with a byte order mark;
- Excel: one sheet with a bold header (write-excel-file);
- Word: a .docx with the title, section headings, bold field labels
  and lists.

Word uses the docx package, added at the user's OK. It is pinned to 9.9.0,
a release at least two weeks old, and loaded only on the click.

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

* fix(content): read a Plan row's opportunity from its key, and restore only what is still dismissed

hidePlanRow and showPlanRow no longer take an opportunity id from the client:
the server reads it from the row key the mark is written under (a uuid, or
'invalid'). Show again gives an opportunity back its status only while it
is still dismissed; one completed or reopened elsewhere keeps its status and
only the mark goes. Hidden rows read only dismissed opportunities. The
Priority card's dot is in ink, as its outline badge.

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

* fix(content): keep a failed draft read from offering Send to Editor, and tell the list about Send to Plan

- A failed getOpportunityDrafts is no "no draft": the row menu and the
  panel offer "Couldn't check for a draft · Retry" instead of Start, so a
  failed read never starts a second draft for the same opportunity.
- Send to Plan from the panel calls the page's onPrioritized, so the row's
  menu says Open in Plan without a reload.
- Start's page types come from the opportunity's brand, not the active one.
- content.send is gone; content.alternative.hint is Another angle's title.
- Drop the unused contains mock and fix the content prop's doc.

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

* test(content): count Export in front of the panel's draft retry

#1334's retry test lists the panel's front buttons; with this PR's Export
button there is one more.

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

* fix(content): pin docx to 9.7.0, which installs on Node 20

[email protected] depends on nanoid@^6, whose engines need Node 22+, so CI's
Node 20 web job (and Vercel's install on Node 20) stopped at yarn install.
9.7.0 is the last release on nanoid@^5 (Node ^18 || >=20) and @types/node
^25, and has every API the export uses. The lockfile drops docx 9.9.0's
nanoid 6, @types/node 26 and undici-types 8.9; @types/node@^25.2.3 joins
the existing 25.7.0 entry.

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

* fix(content): wrap multi-line export cells, and use the sheet's header case in the CSV

An outline step's points sit on their own lines in one value; the sheet's
cell now wraps, so Excel shows them. The CSV's header reads Section,Field,Value
like the sheet's.

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

---------

Co-authored-by: Cihan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
gkhngyk added a commit that referenced this pull request Oct 22, 2026
…or Markdown (#1348)

* fix(content): draw the Plan's mix bars to one scale, and open the page in its final layout

- "What AI cites in your topics" drew both shares on one track scaled to
  AI's largest share, so a type the brand leans on more than AI does
  (e.g. 35% · 73%) ran its bar past the track onto the shares column. The
  two shares are now two thin bars on one scale, the larger of the two,
  never past the track.
- The list and the sections above it (AI results, the mix) were read and
  drawn apart, so the list showed mid-screen first and jumped down when
  the sections came in. The page now shows one spinner until both reads
  are in; a list that fails says so at once.

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

* fix(content): show the brand's cited pages as an Overview, not an overlap warning

More of the brand's pages cited for the same prompts is no loss (AI
answers aren't a ranking), so neither Start nor the Plan treats it as a
problem any more:

- Start's "Overlap check" is an "Overview": a plain box listing the
  brand's pages AI already cites for these prompts, with no amber warning,
  no "Safe to create" and no "Recommended". The action the person clicked
  stays chosen (Create stays Create); the choices are the plan's page when
  it named one, a new page, and optimizing the page cited most.
- The Plan drops the Overlaps card, the ⚠ Overlap tag on rows, and the
  rows that were listed only because another page of the brand is cited
  for the same prompts.

content_plan_pages (00220/00221) still returns overlaps; the Plan no
longer reads it.

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

* feat(content): assign, mark as a priority or hide a Content plan row

Each Priority list row gets a "…" menu:
- Assign to… (every member): a row with a draft assigns its Action
  Center task (sending the draft first when needed); a row without one
  opens Start on Team, which now has an "Assign to" picker. The Who
  column shows the assignee.
- Mark as priority (admins and managers): the row goes to the top with a
  Priority tag; a Priority card counts and filters the marked rows.
- Hide from the plan (admins and managers): the row leaves the list, with
  Undo and "N hidden rows · Show"; an opportunity's row also dismisses the
  opportunity and gets its status back when shown again.

Migration 00229 adds content_plan_marks (members read; admins and
managers write).

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

* feat(content): suggest opportunity content types by the brand's site type

Content Opportunities gave every brand the same ten asset types, so a
shop could get a glossary or landing page and a SaaS brand a product or
category page. The generator now reads brands.site_type (or the
editor's guess from Shopping mode and industry), lists that site's page
types with their formats in the prompt, and limits assetType and the
supporting types to them, plus the earned third_party_article and
backlink. No calculation changes.

Older opportunities keep their stored types and are read as the brand's
page types (pillar_guide -> guide / buying_guide, landing_page ->
solution_page / collection_page / destination_page, and so on). The
opportunities list, the drawer, the assets card and Copy All Data name
them with the editor's labels. Start preselects an opportunity's type
for a new page; an existing page goes by its own address or title
first. The Content Plan follows the same rules.

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

* feat(content): open the Content Editor from Content Opportunities

From the user's spec, PR B of the Content Editor entry points, with the
user's follow-up choices:

- Opportunity panel: three buttons in front, in this order: Send to
  Actions, Generate Brief and Send to Editor. Each turns into its done
  state in place (Open in Actions, Brief Generated, Open draft). The
  rest move into a "..." menu on the right: Send to Plan, Another angle,
  Send to Workflow, Copy All Data, Mark as reviewed, Restore, Dismiss.
- Opportunities list: a row's actions sit in one "..." menu: Send to
  Editor or Open draft, Send to Plan or Open in Plan, Send to Workflow,
  Open in new tab, Dismiss. The Actions column narrows to fit.
- Send to Editor opens New content > Start. A create decision starts a
  new page; any other decision starts on its first target page
  (lib/content/opportunity-start.ts). Owned work still open only.
  getOpportunityDrafts finds the draft already being written.
- Send to Plan marks the opportunity's Plan row as a priority
  (content_plan_marks, #1321) for admins and managers;
  getPlanPriorities reads which rows already are.

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

* feat(content): export an opportunity as CSV, Excel or Word

The user asked for an Export button on the opportunity's full page and in
the right-hand panel, listing Export CSV, Export Excel and Export Word one
under the other. It sits on the actions row, left of the "..." menu.

All three formats come from what Copy All Data copies.
opportunityToMarkdown now renders a structured write-up
(opportunityDocument: sections of fields, items, numbered steps and
text), and its Markdown output is unchanged. lib/content/opportunity-export.ts
writes that same write-up as:
- CSV: section, field and value rows, with a byte order mark;
- Excel: one sheet with a bold header (write-excel-file);
- Word: a .docx with the title, section headings, bold field labels
  and lists.

Word uses the docx package, added at the user's OK. It is pinned to 9.9.0,
a release at least two weeks old, and loaded only on the click.

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

* fix(content): read a Plan row's opportunity from its key, and restore only what is still dismissed

hidePlanRow and showPlanRow no longer take an opportunity id from the client:
the server reads it from the row key the mark is written under (a uuid, or
'invalid'). Show again gives an opportunity back its status only while it
is still dismissed; one completed or reopened elsewhere keeps its status and
only the mark goes. Hidden rows read only dismissed opportunities. The
Priority card's dot is in ink, as its outline badge.

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

* fix(content): keep a failed draft read from offering Send to Editor, and tell the list about Send to Plan

- A failed getOpportunityDrafts is no "no draft": the row menu and the
  panel offer "Couldn't check for a draft · Retry" instead of Start, so a
  failed read never starts a second draft for the same opportunity.
- Send to Plan from the panel calls the page's onPrioritized, so the row's
  menu says Open in Plan without a reload.
- Start's page types come from the opportunity's brand, not the active one.
- content.send is gone; content.alternative.hint is Another angle's title.
- Drop the unused contains mock and fix the content prop's doc.

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

* test(content): count Export in front of the panel's draft retry

#1334's retry test lists the panel's front buttons; with this PR's Export
button there is one more.

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

* fix(content): pin docx to 9.7.0, which installs on Node 20

[email protected] depends on nanoid@^6, whose engines need Node 22+, so CI's
Node 20 web job (and Vercel's install on Node 20) stopped at yarn install.
9.7.0 is the last release on nanoid@^5 (Node ^18 || >=20) and @types/node
^25, and has every API the export uses. The lockfile drops docx 9.9.0's
nanoid 6, @types/node 26 and undici-types 8.9; @types/node@^25.2.3 joins
the existing 25.7.0 entry.

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

* fix(content): wrap multi-line export cells, and use the sheet's header case in the CSV

An outline step's points sit on their own lines in one value; the sheet's
cell now wraps, so Excel shows them. The CSV's header reads Section,Field,Value
like the sheet's.

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

* feat(content): put the editor's tags on a second line, and keep the side panel's tabs in sight, Rules first

The header's top row keeps the title and the page's actions; the page type,
method, status, rules and cited-passages tags move to a line of their own
under the title, all of them at any width and lined up (the status badge sat
lower in its wrapper). While the side panel is closed, its tabs stay down the
editor's right edge and open it on the one picked, so the panel is never out
of sight on a window under 1280px, where it starts closed. Rules is the first
tab and the panel opens on it; Impact reads when first opened.

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

* feat(content): export the page from the Content Editor as Word, HTML or Markdown

Export sits beside Copy HTML in the editor's header and downloads the page as
Copy HTML gives it. HTML is that page as a titled document. Word and Markdown
read it as blocks first (headings, paragraphs, quotes, nested and numbered
lists, tables, links, bold and italic): Markdown keeps an HTML block as HTML,
Word keeps its text. The schema JSON-LD is markup, so only the HTML file
carries it. A page without an H1 opens with its title. On a phone the button
is an icon, so the header's one row still fits.

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

---------

Co-authored-by: Cihan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Gökhan Geyik <[email protected]>
gkhngyk added a commit that referenced this pull request Oct 22, 2026
…reation date (#1354)

* fix(content): draw the Plan's mix bars to one scale, and open the page in its final layout

- "What AI cites in your topics" drew both shares on one track scaled to
  AI's largest share, so a type the brand leans on more than AI does
  (e.g. 35% · 73%) ran its bar past the track onto the shares column. The
  two shares are now two thin bars on one scale, the larger of the two,
  never past the track.
- The list and the sections above it (AI results, the mix) were read and
  drawn apart, so the list showed mid-screen first and jumped down when
  the sections came in. The page now shows one spinner until both reads
  are in; a list that fails says so at once.

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

* fix(content): show the brand's cited pages as an Overview, not an overlap warning

More of the brand's pages cited for the same prompts is no loss (AI
answers aren't a ranking), so neither Start nor the Plan treats it as a
problem any more:

- Start's "Overlap check" is an "Overview": a plain box listing the
  brand's pages AI already cites for these prompts, with no amber warning,
  no "Safe to create" and no "Recommended". The action the person clicked
  stays chosen (Create stays Create); the choices are the plan's page when
  it named one, a new page, and optimizing the page cited most.
- The Plan drops the Overlaps card, the ⚠ Overlap tag on rows, and the
  rows that were listed only because another page of the brand is cited
  for the same prompts.

content_plan_pages (00220/00221) still returns overlaps; the Plan no
longer reads it.

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

* feat(content): assign, mark as a priority or hide a Content plan row

Each Priority list row gets a "…" menu:
- Assign to… (every member): a row with a draft assigns its Action
  Center task (sending the draft first when needed); a row without one
  opens Start on Team, which now has an "Assign to" picker. The Who
  column shows the assignee.
- Mark as priority (admins and managers): the row goes to the top with a
  Priority tag; a Priority card counts and filters the marked rows.
- Hide from the plan (admins and managers): the row leaves the list, with
  Undo and "N hidden rows · Show"; an opportunity's row also dismisses the
  opportunity and gets its status back when shown again.

Migration 00229 adds content_plan_marks (members read; admins and
managers write).

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

* feat(content): archive, delete and set a status from the Library's rows

Each Library row gets a menu: its status (In progress · In review ·
Ready · Published; Ready goes through Mark ready, keeping a History
version and completing the draft's task) and, for admins and managers,
Send to Archive (with Undo) or Restore, and Delete behind a
confirmation. An Archived tab holds archived drafts, which keep their
status and leave the other tabs, the Plan and the MCP list. Created and
Updated replace the AEO score column, and "Draft" reads "In progress".

Migration 00233 adds content_drafts.archived_at/archived_by, a trigger
letting only admins and managers archive, and a manager delete policy
(drafts had none).

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

* feat(content): suggest opportunity content types by the brand's site type

Content Opportunities gave every brand the same ten asset types, so a
shop could get a glossary or landing page and a SaaS brand a product or
category page. The generator now reads brands.site_type (or the
editor's guess from Shopping mode and industry), lists that site's page
types with their formats in the prompt, and limits assetType and the
supporting types to them, plus the earned third_party_article and
backlink. No calculation changes.

Older opportunities keep their stored types and are read as the brand's
page types (pillar_guide -> guide / buying_guide, landing_page ->
solution_page / collection_page / destination_page, and so on). The
opportunities list, the drawer, the assets card and Copy All Data name
them with the editor's labels. Start preselects an opportunity's type
for a new page; an existing page goes by its own address or title
first. The Content Plan follows the same rules.

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

* feat(content): open the Content Editor from Content Opportunities

From the user's spec, PR B of the Content Editor entry points, with the
user's follow-up choices:

- Opportunity panel: three buttons in front, in this order: Send to
  Actions, Generate Brief and Send to Editor. Each turns into its done
  state in place (Open in Actions, Brief Generated, Open draft). The
  rest move into a "..." menu on the right: Send to Plan, Another angle,
  Send to Workflow, Copy All Data, Mark as reviewed, Restore, Dismiss.
- Opportunities list: a row's actions sit in one "..." menu: Send to
  Editor or Open draft, Send to Plan or Open in Plan, Send to Workflow,
  Open in new tab, Dismiss. The Actions column narrows to fit.
- Send to Editor opens New content > Start. A create decision starts a
  new page; any other decision starts on its first target page
  (lib/content/opportunity-start.ts). Owned work still open only.
  getOpportunityDrafts finds the draft already being written.
- Send to Plan marks the opportunity's Plan row as a priority
  (content_plan_marks, #1321) for admins and managers;
  getPlanPriorities reads which rows already are.

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

* feat(content): export an opportunity as CSV, Excel or Word

The user asked for an Export button on the opportunity's full page and in
the right-hand panel, listing Export CSV, Export Excel and Export Word one
under the other. It sits on the actions row, left of the "..." menu.

All three formats come from what Copy All Data copies.
opportunityToMarkdown now renders a structured write-up
(opportunityDocument: sections of fields, items, numbered steps and
text), and its Markdown output is unchanged. lib/content/opportunity-export.ts
writes that same write-up as:
- CSV: section, field and value rows, with a byte order mark;
- Excel: one sheet with a bold header (write-excel-file);
- Word: a .docx with the title, section headings, bold field labels
  and lists.

Word uses the docx package, added at the user's OK. It is pinned to 9.9.0,
a release at least two weeks old, and loaded only on the click.

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

* fix(content): read a Plan row's opportunity from its key, and restore only what is still dismissed

hidePlanRow and showPlanRow no longer take an opportunity id from the client:
the server reads it from the row key the mark is written under (a uuid, or
'invalid'). Show again gives an opportunity back its status only while it
is still dismissed; one completed or reopened elsewhere keeps its status and
only the mark goes. Hidden rows read only dismissed opportunities. The
Priority card's dot is in ink, as its outline badge.

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

* fix(content): keep a failed draft read from offering Send to Editor, and tell the list about Send to Plan

- A failed getOpportunityDrafts is no "no draft": the row menu and the
  panel offer "Couldn't check for a draft · Retry" instead of Start, so a
  failed read never starts a second draft for the same opportunity.
- Send to Plan from the panel calls the page's onPrioritized, so the row's
  menu says Open in Plan without a reload.
- Start's page types come from the opportunity's brand, not the active one.
- content.send is gone; content.alternative.hint is Another angle's title.
- Drop the unused contains mock and fix the content prop's doc.

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

* test(content): count Export in front of the panel's draft retry

#1334's retry test lists the panel's front buttons; with this PR's Export
button there is one more.

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

* fix(content): guard archived drafts on insert too, and keep them out of the Action Center

- 00233: guard_content_draft_archive runs before insert or update. A
  member's new draft with archived_at or archived_by set is refused
  (42501), so archived_by is never the app's word; the server, which
  bypasses RLS, is unaffected.
- readActionDrafts skips archived drafts: the Action Center drawer doesn't
  list them, and a task's Start writes a new draft instead of reopening one.
- Remove aeoScoreText and the list's scoreBefore/scoreAfter, unused since
  the AEO Score column went.

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

* fix(content): pin docx to 9.7.0, which installs on Node 20

[email protected] depends on nanoid@^6, whose engines need Node 22+, so CI's
Node 20 web job (and Vercel's install on Node 20) stopped at yarn install.
9.7.0 is the last release on nanoid@^5 (Node ^18 || >=20) and @types/node
^25, and has every API the export uses. The lockfile drops docx 9.9.0's
nanoid 6, @types/node 26 and undici-types 8.9; @types/node@^25.2.3 joins
the existing 25.7.0 entry.

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

* fix(content): wrap multi-line export cells, and use the sheet's header case in the CSV

An outline step's points sit on their own lines in one value; the sheet's
cell now wraps, so Excel shows them. The CSV's header reads Section,Field,Value
like the sheet's.

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

* fix(content): let Start write a new draft once its work's draft is archived

00218's content_drafts_action_work_key counted archived drafts too, so a
task whose draft was archived could never start again: readActionDrafts
skips the archived one, the insert hit the key, and the 23505 retry found
no winner. 00233 recreates the key over drafts not archived. Restoring the
archived one while a newer draft does the same work is refused (23505),
named newer_draft, and the Library says what to do. getOpportunityDrafts
(from #1334, now on main) skips archived drafts too.

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

* feat(content): put the editor's tags on a second line, and keep the side panel's tabs in sight, Rules first

The header's top row keeps the title and the page's actions; the page type,
method, status, rules and cited-passages tags move to a line of their own
under the title, all of them at any width and lined up (the status badge sat
lower in its wrapper). While the side panel is closed, its tabs stay down the
editor's right edge and open it on the one picked, so the panel is never out
of sight on a window under 1280px, where it starts closed. Rules is the first
tab and the panel opens on it; Impact reads when first opened.

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

* feat(content): export the page from the Content Editor as Word, HTML or Markdown

Export sits beside Copy HTML in the editor's header and downloads the page as
Copy HTML gives it. HTML is that page as a titled document. Word and Markdown
read it as blocks first (headings, paragraphs, quotes, nested and numbered
lists, tables, links, bold and italic): Markdown keeps an HTML block as HTML,
Word keeps its text. The schema JSON-LD is markup, so only the HTML file
carries it. A page without an H1 opens with its title. On a phone the button
is an icon, so the header's one row still fits.

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

* feat(content): export the Library as CSV, Excel or Word, by tab and creation date

The Library's header gets Export: the drafts listed (the tab, within a new
Created range: any time or the last 7, 30 or 90 days, kept in the URL) with
their pages. CSV and Excel hold a row per draft: title, status, method, page
type, who wrote it, dates, the live page's address, its length and its text
(Excel cuts a page past a cell's 32,767 characters). Word puts every draft in
one document, each from a page of its own under a line saying where it
stands. A row's menu exports one draft as Word, HTML or Markdown, as the
editor's Export does.

The pages are read for the export only (getContentDraftPages, 100 ids a
read). draftDocx's rendering is shared with the Library's document, whose
numbered lists each count on their own.

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

* fix(content): don't open an archived draft from a tracked prompt

getDraftForPrompt (#1333) skips archived drafts, as getOpportunityDrafts
does, so Start opens the work in hand, never one sent to the Archive.

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

---------

Co-authored-by: Cihan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Gökhan Geyik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-migration Adds or edits a migration — apply it to the hosted database

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants