Skip to content

Commit bdfa156

Browse files
authored
Merge branch 'main' into repo-assist/feature-811-fsdocs-convert-2cf2c2973fcbd211
2 parents 8da4915 + e442a7b commit bdfa156

17 files changed

Lines changed: 368 additions & 81 deletions

File tree

.github/workflows/repo-assist.lock.yml

Lines changed: 33 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/repo-assist.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ tools:
7171
bash: true
7272
repo-memory: true
7373

74-
source: githubnext/agentics/workflows/repo-assist.md@f2c5cf1e4af58e09a93ba0703c6bf084711b265f
74+
source: githubnext/agentics/workflows/repo-assist.md@afb00b92a9514fee9a14c583f059a03d05738f70
7575
---
7676

7777
# Repo Assist
@@ -109,23 +109,35 @@ Use persistent repo memory to track:
109109

110110
Read memory at the **start** of every run; update it at the **end**.
111111

112-
**Important**: Memory may not be 100% accurate. Issues may have been created, closed, or commented on; PRs may have been created, merged, commented on, or closed since the last run. Always verify memory against current repository state - reviewing recent activity since your last run is wise before acting on stale assumptions.
112+
**Important**: Memory may not be 100% accurate. Issues may have been created, closed, or commented on; PRs may have been created, merged, commented on, or closed since the last run. Always verify memory against current repository state — reviewing recent activity since your last run is wise before acting on stale assumptions.
113+
114+
**Memory backlog tracking**: Your memory may contain notes about issues or PRs that still need attention (e.g., "issues #384, #336 have labels but no comments"). These are **action items for you**, not just informational notes. Each run, check your memory's `notes` field and other tracking fields for any explicitly flagged backlog work, and prioritise acting on it.
113115

114116
## Workflow
115117

116118
Use a **round-robin strategy**: each run, work on a different subset of tasks, rotating through them across runs so that all tasks get attention over time. Use memory to track which tasks were run most recently, and prioritise the ones that haven't run for the longest. Aim to do 2–4 tasks per run (plus the mandatory Task 11).
117119

118120
**Repeat-run mode**: When invoked via `gh aw run repo-assist --repeat`, runs occur every 5–10 minutes. Even in this mode, **actively look for useful work to do** on every run. Do not skip a run just because the last one was recent or because open PRs are awaiting CI — there is always a task to advance: label issues, scan the backlog, study the codebase, prepare a fix, push an update, or work on Task 10. Treat a "nothing to do" conclusion as a sign you haven't looked hard enough, unless there really is, like, literally nothing to do. And be careful not to do duplicate work across runs — check memory to see if you've already tried a fix or commented on an issue before doing it again.
119121

122+
**Progress Imperative**: Your primary purpose is to make forward progress on the repository. A "no action taken" outcome should be rare and only occur when:
123+
- Every open issue has either been fixed, is being actively worked on, or has already received a substantive Repo Assist comment AND no new human activity has occurred
124+
- Every open PR has been reviewed or commented on appropriately
125+
- All labeling is complete
126+
- There are genuinely no improvements, fixes, or triage actions possible
127+
128+
If your memory notes issues that "have labels but no Repo Assist comments" or similar backlog items, **you must act on them** — don't just note them for future runs. Scan the full issue list, not just recent activity. The absence of new issues since your last run does not mean there's nothing to do — there may be older issues awaiting triage, comment, or fix attempts.
129+
120130
Always do Task 11 (Update Monthly Activity Summary Issue) every run. In all comments and PR descriptions, identify yourself as "Repo Assist".
121131

122132
### Task 1: Triage and Comment on Open Issues
123133

124134
1. List open issues sorted by creation date ascending (oldest first). Resume from your memory's backlog cursor; reset when you reach the end.
125-
2. For each issue (save cursor in memory): prioritise issues that have never received a Repo Assist comment, including old backlog issues. Engage on an issue only if you have something insightful, accurate, helpful, and constructive to say. Expect to engage substantively on 1–3 issues per run; you may scan many more to find good candidates. Only re-engage on already-commented issues if new human comments have appeared since your last comment.
126-
3. Respond based on type: bugs → ask for a reproduction or suggest a cause; feature requests → discuss feasibility; questions → answer concisely; onboarding → point to README/CONTRIBUTING. Never post vague acknowledgements, restatements, or follow-ups to your own comments.
135+
2. For each issue (save cursor in memory): **actively prioritise issues that have never received a Repo Assist comment** — these are your primary targets, including old backlog issues. Read the issue comments and check your memory's `comments_made` fields to help determine priority issues. Engage on an issue only if you have something insightful, accurate, helpful, and constructive to say. Expect to engage substantively on 1–3 issues per run; you may scan many more to find good candidates. Expect to eventually engage on most issues - only very rarely choose not to engage, as your engagement is usually helpful. Only re-engage on already-commented issues if new human comments engaging in conversation with you have appeared since your last comment.
136+
3. Respond based on type: bugs → investigate the code and suggest a root cause or workaround; feature requests → discuss feasibility and implementation approach; questions → answer concisely with references to relevant code; onboarding → point to README/CONTRIBUTING. Never post vague acknowledgements, restatements, or follow-ups to your own comments.
127137
4. Begin every comment with: `🤖 *This is an automated response from Repo Assist.*`
128-
5. Update memory with comments made and the new cursor position.
138+
5. Update memory with comments made and the new cursor position. **Remove issue numbers from the "uncommented issues" note when you comment on them.**
139+
140+
**Important**: If issues have labels but no Repo Assist comments, treat this as a backlog you must work through — do not defer indefinitely.
129141

130142
### Task 2: Fix Issues via Pull Requests
131143

@@ -263,7 +275,7 @@ Maintain a single open issue titled `[Repo Assist] Monthly Activity {YYYY}-{MM}`
263275
- PRs that should be closed (stale, superseded, etc.)
264276
- Any strategic suggestions (goals, priorities)
265277
Use repo memory and the activity log to compile this list. Include direct links for every item. Keep entries to one line each.
266-
5. Do not update the activity issue if nothing was done in the current run.
278+
5. Do not update the activity issue if nothing was done in the current run. However, if you conclude "nothing to do", first verify this by checking: (a) Are there any open issues without a Repo Assist comment? (b) Are there issues in your memory flagged for attention? (c) Are there any bugs that could be investigated or fixed? If any of these are true, go back and do that work instead of concluding with no action.
267279

268280
## Guidelines
269281

@@ -277,3 +289,4 @@ Maintain a single open issue titled `[Repo Assist] Monthly Activity {YYYY}-{MM}`
277289
- **Anti-spam**: no repeated or follow-up comments to yourself in a single run; re-engage only when new human comments have appeared.
278290
- **Systematic**: use the backlog cursor to process oldest issues first over successive runs. Do not stop early.
279291
- **Quality over quantity**: noise erodes trust. Do nothing rather than add low-value output.
292+
- **Bias toward action**: While avoiding spam, actively seek ways to contribute value. If you're about to conclude "no action needed", first verify: (a) you've checked the full open issue list, not just recent activity, (b) check there are no uncommented issues where you haven't engaged but should, (c) check there are no issues that are fixable or investigatable, (d) check all labeling is current, (e) check there are no useful engineering improvements you could perform, (f) check there is no testing to improve, (g) check there are no dependency updates to make, (h) check there are no code simplifications to make, (i) check there are no documentation improvements to make, (j) check there are no CI performance improvements to make. A "no action" run should be genuinely exceptional except in a near-perfect repository with no recent changes.

RELEASE_NOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,23 @@
77
* `fsdocs convert` now accepts the input file as a positional argument (e.g. `fsdocs convert notebook.ipynb -o notebook.html`). [#1019](https://github.com/fsprojects/FSharp.Formatting/pull/1019)
88
* `fsdocs convert` infers the output format from the output file extension when `--outputformat` is not specified (e.g. `-o out.md` implies `--outputformat markdown`). [#1019](https://github.com/fsprojects/FSharp.Formatting/pull/1019)
99
* `fsdocs convert` now accepts `-o` as a shorthand for `--output`. [#1019](https://github.com/fsprojects/FSharp.Formatting/pull/1019)
10+
* Add "Copy" button to all code blocks in generated documentation, making it easy to copy code samples to the clipboard. [#72](https://github.com/fsprojects/FSharp.Formatting/issues/72)
1011
* Add `<FsDocsAllowExecutableProject>true</FsDocsAllowExecutableProject>` project file setting to include executable projects (OutputType=Exe/WinExe) in API documentation generation. [#918](https://github.com/fsprojects/FSharp.Formatting/issues/918)
1112
* Add `{{fsdocs-logo-alt}}` substitution (configurable via `<FsDocsLogoAlt>` MSBuild property, defaults to `Logo`) for accessible alt text on the header logo image. [#626](https://github.com/fsprojects/FSharp.Formatting/issues/626)
1213

1314
### Fixed
15+
* Fix doc generation failure for members with 5D/6D+ array parameters by correctly formatting array type signatures in XML doc format (e.g. `System.Double[0:,0:,0:,0:,0:]` for a 5D array). [#702](https://github.com/fsprojects/FSharp.Formatting/issues/702)
1416
* Fix `_menu_template.html` and `_menu-item_template.html` being copied to the output directory. [#803](https://github.com/fsprojects/FSharp.Formatting/issues/803)
1517
* Fix `ApiDocMember.Details.ReturnInfo.ReturnType` returning `None` for properties that have both a getter and a setter. [#734](https://github.com/fsprojects/FSharp.Formatting/issues/734)
1618
* Improve error message when a named code snippet is not found (e.g. `(*** include:name ***)` with undefined name now reports the missing name clearly). [#982](https://github.com/fsprojects/FSharp.Formatting/pull/982)
1719
* HTML-encode XML doc text nodes and unresolved `<see cref>` values to prevent HTML injection and fix broken output when docs contain characters like `<`, `>`, or backticks in generic type notation. [#748](https://github.com/fsprojects/FSharp.Formatting/issues/748)
1820
* Add uppercase output kind extension (e.g. `HTML`, `IPYNB`) to `ConditionalDefines` so that `#if HTML` and `(*** condition: HTML ***)` work alongside their lowercase variants. [#693](https://github.com/fsprojects/FSharp.Formatting/issues/693)
1921
* Strip `#if SYMBOL` / `#endif // SYMBOL` marker lines from `LiterateCode` source before syntax-highlighting so they do not appear in formatted output. [#693](https://github.com/fsprojects/FSharp.Formatting/issues/693)
22+
* Members and functions annotated with `CompilerMessageAttribute(IsHidden=true)` are now automatically excluded from API docs, matching the behaviour of `[omit]` / `<exclude/>`. [#144](https://github.com/fsprojects/FSharp.Formatting/issues/144)
2023
* Fix incorrect column ranges for inline spans (links, images, inline code) in the Markdown parser — spans and subsequent literals now report correct `StartColumn`/`EndColumn` values. [#744](https://github.com/fsprojects/FSharp.Formatting/issues/744)
2124
* Normalize `--projects` paths to absolute paths before passing to the project cracker, fixing failures when relative paths are supplied. [#793](https://github.com/fsprojects/FSharp.Formatting/issues/793)
25+
* Fix incorrect paragraph indentation for loose list items: a paragraph indented at the outer list item's continuation level is now correctly treated as a sibling of surrounding sublists rather than being absorbed into the first sublist item's body. [#347](https://github.com/fsprojects/FSharp.Formatting/issues/347)
26+
* Improve CommonMark compliance for ATX headings: reject `#` not followed by a space (e.g. `#NoSpace` is now a paragraph), reject more than 6 `#` characters as a heading, support 0–3 leading spaces before the opening `#` sequence, and fix empty content when the entire header body is a closing `###` sequence. [#191](https://github.com/fsprojects/FSharp.Formatting/issues/191)
2227

2328
### Changed
2429
* Update FCS to 43.10.100. [#935](https://github.com/fsprojects/FSharp.Formatting/pull/966)

docs/_template.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
<script type="module" src="{{root}}content/fsdocs-details-toggle.js"></script>
9898
<script type="module" src="{{root}}content/fsdocs-theme.js"></script>
9999
<script type="module" src="{{root}}content/fsdocs-search.js"></script>
100+
<script type="module" src="{{root}}content/fsdocs-copy-button.js"></script>
100101
{{fsdocs-body-extra}}
101102
</body>
102103
</html>

docs/content/fsdocs-copy-button.js

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// Adds a "Copy" button to every code block so readers can easily copy snippets.
2+
function createCopyButton() {
3+
const button = document.createElement('button')
4+
button.className = 'copy-code-button'
5+
button.setAttribute('aria-label', 'Copy code to clipboard')
6+
button.textContent = 'Copy'
7+
return button
8+
}
9+
10+
function attachCopyHandler(button, getText) {
11+
button.addEventListener('click', function () {
12+
const text = getText()
13+
if (navigator.clipboard && navigator.clipboard.writeText) {
14+
navigator.clipboard.writeText(text).then(
15+
function () {
16+
button.textContent = 'Copied!'
17+
setTimeout(function () {
18+
button.textContent = 'Copy'
19+
}, 2000)
20+
},
21+
function () {
22+
button.textContent = 'Failed'
23+
setTimeout(function () {
24+
button.textContent = 'Copy'
25+
}, 2000)
26+
}
27+
)
28+
} else {
29+
// Fallback for non-HTTPS environments
30+
const el = document.createElement('textarea')
31+
el.value = text
32+
document.body.appendChild(el)
33+
el.select()
34+
document.execCommand('copy')
35+
document.body.removeChild(el)
36+
button.textContent = 'Copied!'
37+
setTimeout(function () {
38+
button.textContent = 'Copy'
39+
}, 2000)
40+
}
41+
})
42+
}
43+
44+
document.addEventListener('DOMContentLoaded', function () {
45+
// table.pre blocks (F# highlighted code, sometimes with line numbers)
46+
document.querySelectorAll('table.pre').forEach(function (table) {
47+
const wrapper = document.createElement('div')
48+
wrapper.className = 'code-block-wrapper'
49+
table.parentNode.insertBefore(wrapper, table)
50+
wrapper.appendChild(table)
51+
52+
const button = createCopyButton()
53+
wrapper.appendChild(button)
54+
55+
const snippet = table.querySelector('.snippet pre')
56+
attachCopyHandler(button, function () {
57+
return (snippet || table).innerText
58+
})
59+
})
60+
61+
// Standard pre > code blocks (Markdown fenced code, standalone fssnip, etc.)
62+
// Skip those already handled inside table.pre above.
63+
document.querySelectorAll('pre > code').forEach(function (code) {
64+
if (code.closest('table.pre')) return
65+
const pre = code.parentElement
66+
pre.classList.add('has-copy-button')
67+
68+
const button = createCopyButton()
69+
pre.appendChild(button)
70+
71+
attachCopyHandler(button, function () {
72+
return code.innerText
73+
})
74+
})
75+
})

docs/content/fsdocs-default.css

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
731731
font-size: inherit;
732732
}
733733

734-
table.pre, #content > pre.fssnip {
734+
table.pre, #content > pre.fssnip, .code-block-wrapper > table.pre {
735735
border: 1px solid var(--code-fence-border-color);
736736
}
737737

@@ -740,6 +740,47 @@ table.pre, pre.fssnip.highlighted {
740740
padding: var(--spacing-200);
741741
}
742742

743+
/* Copy code button */
744+
.code-block-wrapper {
745+
position: relative;
746+
display: block;
747+
margin: var(--spacing-300) 0;
748+
}
749+
750+
.code-block-wrapper > table.pre {
751+
margin: 0;
752+
}
753+
754+
pre.has-copy-button {
755+
position: relative;
756+
}
757+
758+
.copy-code-button {
759+
position: absolute;
760+
top: var(--spacing-100);
761+
right: var(--spacing-100);
762+
padding: var(--spacing-50) var(--spacing-100);
763+
background-color: var(--header-background);
764+
border: 1px solid var(--header-border);
765+
border-radius: var(--radius);
766+
color: var(--text-color);
767+
cursor: pointer;
768+
font-family: var(--system-font);
769+
font-size: var(--font-50);
770+
opacity: 0;
771+
transition: opacity 0.2s ease-in-out;
772+
z-index: 10;
773+
774+
&:hover {
775+
background-color: var(--menu-item-hover-background);
776+
}
777+
}
778+
779+
pre.has-copy-button:hover .copy-code-button,
780+
.code-block-wrapper:hover .copy-code-button {
781+
opacity: 1;
782+
}
783+
743784
table.pre .snippet pre.fssnip {
744785
padding: 0;
745786
margin: 0;

docs/content/fsdocs-tips.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,16 @@ function showTip(evt, name, unique, owner) {
4545
}
4646

4747
function Clipboard_CopyTo(value) {
48-
const tempInput = document.createElement("input");
49-
tempInput.value = value;
50-
document.body.appendChild(tempInput);
51-
tempInput.select();
52-
document.execCommand("copy");
53-
document.body.removeChild(tempInput);
48+
if (navigator.clipboard) {
49+
navigator.clipboard.writeText(value);
50+
} else {
51+
const tempInput = document.createElement("input");
52+
tempInput.value = value;
53+
document.body.appendChild(tempInput);
54+
tempInput.select();
55+
document.execCommand("copy");
56+
document.body.removeChild(tempInput);
57+
}
5458
}
5559

5660
window.showTip = showTip;

0 commit comments

Comments
 (0)