Closed
Bug 2068532
Opened 2 months ago
Closed 2 months ago
Document how source-comment API references render in the documentation skill
Categories
(Developer Infrastructure :: AI for Development, task)
Developer Infrastructure
AI for Development
Tracking
(firefox157 fixed)
RESOLVED
FIXED
157 Branch
| Tracking | Status | |
|---|---|---|
| firefox157 | --- | fixed |
People
(Reporter: dao, Assigned: dao)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
The documentation skill covers Sphinx, toctrees and docs/config.yml, and bug 2065040 added a note on writing links inside source comments. Nothing else in it describes how a JSDoc comment comes out on a generated API reference page, which is where the surprises are. Each of the following cost time while documenting and type-checking browser/components/tabbrowser/Tabbrowser.sys.mjs, so they are gotchas with a case behind them rather than a reading of the sphinx-js source:
- jsdoc rejects type expressions TypeScript accepts — a type predicate, a tuple, indexed access, a postfix
[]on a parenthesised union — and only logs a build ERROR while the member still renders, minus the row for the parameter or return value being documented (bug 2064136, bug 2065814). - A documented default value renders, so
[options.animate=true]is a claim about the code and should mirror the signature. A computed default cannot be kept in sync there and belongs in the prose (bug 2068511). - The name a comment invents for a destructured parameter is printed in front of every property under it, so it is part of the rendered API rather than a local choice (bug 2068511).
@throwsrenders as athrowsfield with its type, butjs:autoclasstakes parameters, return values and exceptions from the constructor only (bug 2068511).
Collect those in one section, and move the existing source-comment link note into it from the document cross-referencing section where it currently sits.
Both copies of the skill have to stay identical; ./mach lint -l agent-skills-sync --fix mirrors them.
| Assignee | ||
Comment 1•2 months ago
|
||
Updated•2 months ago
|
Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Pushed by dgottwald@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/5dcb7d9e57fa
https://hg.mozilla.org/integration/autoland/rev/9737d29c1a89
Document how source-comment API references render in the documentation skill. r=ai4dev-reviewers,padenot DONTBUILD
Comment 3•2 months ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
status-firefox157:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
| Assignee | ||
Updated•1 month ago
|
See Also: → tabbrowser-docs
| Assignee | ||
Updated•1 month ago
|
Blocks: tabbrowser-docs
| Assignee | ||
Updated•1 month ago
|
See Also: tabbrowser-docs →
You need to log in
before you can comment on or make changes to this bug.
Description
•