今日已更新 412 条资讯 | 累计 19972 条内容
关于我们

标签:#developertools

找到 6 篇相关文章

AI 资讯

Handling Lazy-Loaded Content in Automated Screenshots

You set up Puppeteer, navigate to a page, call page.screenshot() , and the bottom half of your image is blank placeholder boxes. Welcome to lazy loading. Most modern sites defer images and heavy content until the user scrolls. Your headless browser never scrolls. So those elements never load. Here's how to deal with it. The scroll trick The most common fix is to programmatically scroll down the page before taking the screenshot: async function scrollToBottom ( page ) { await page . evaluate ( async () => { const delay = ms => new Promise ( r => setTimeout ( r , ms )); const distance = 300 ; while ( window . scrollY + window . innerHeight < document . body . scrollHeight ) { window . scrollBy ( 0 , distance ); await delay ( 150 ); } window . scrollTo ( 0 , 0 ); }); } await page . goto ( " https://example.com " , { waitUntil : " networkidle2 " }); await scrollToBottom ( page ); await page . waitForTimeout ( 1000 ); await page . screenshot ({ fullPage : true }); The 150ms delay between scrolls gives IntersectionObserver -based lazy loaders time to trigger. Too fast and you'll scroll past elements before they start loading. That final waitForTimeout after scrolling back to top lets any remaining images finish rendering. Not elegant, but necessary. Why networkidle2 isn't enough You'd think waitUntil: "networkidle2" would handle this. It waits until there are no more than 2 network connections for 500ms. But lazy-loaded images haven't even been requested yet at that point — they're waiting for a scroll event that never happens. networkidle2 only helps with content that loads on page init. For scroll-triggered content, you need the scroll. The loading="eager" override Some sites use the native loading="lazy" attribute. You can override it before images load: await page . evaluateOnNewDocument (() => { Object . defineProperty ( HTMLImageElement . prototype , " loading " , { set : function ( val ) { this . setAttribute ( " loading " , " eager " ); }, get : function () { retu

2026-07-12 原文 →
AI 资讯

A Verdict Is Not Evidence. Test Is Where I Learned the Difference.

The call-order change came back pass-with-risk. I read the recommendation, saw it had a name and a reason, and felt the task close. Then I looked at the row under it. How was this verified: not run. Nobody had run the queue. I had a label. I did not have proof. This is Part 6 of The Contract Think produced a brief. Plan produced a gate. Build executed inside it. Review scored every requirement against a verdict instead of an impression. Review reads the diff and the plan and decides whether one satisfies the other. It does not run the queue. It cannot. Its whole job is judgment about what the code should do. Test is where someone finally checks what the code actually does. I had been treating those two as the same step. They are not. Test asks one question, and a verdict is not the answer For every active requirement, Test asks how it was verified. Command run, manual QA, or a comparison against known-good output. One of those three, or a written reason none of them ran. Not a recommendation. Not a risk level. Evidence. I built the matrix against the plan's requirements and filled in each row. Most had a command behind them. The call-order requirement had nothing. The cell read not run, and it sat directly below a pass-with-risk that already carried a name and a reason. That name had almost been enough for me. A named risk feels handled. It is not. It is a risk with a label on it, waiting for someone to actually look. So I ran the queue Three notifications, all with a real reason to fire within the same tick. The scheduler picked them up and ordered them by priority instead of arrival. Two landed in the sequence the requirement wanted. The third jumped ahead of a lower-priority notification that was still mid-processing. The change worked almost every time. Under one timing condition, it did not. That is the gap a verdict cannot see. Review had marked the requirement partial because the wording left the mechanism open. Running it found a real failure inside the mech

2026-07-09 原文 →
AI 资讯

Cursor AI Review 2026: The AI-Native Code Editor

Cursor is the first AI code editor I have used that feels less like an autocomplete plugin and more like a place to steer work. It does not write perfect software. It changes the rhythm: ask for a scoped change, review the diff, then tighten it by hand. This Cursor AI review is based on day-to-day developer tasks: reading unfamiliar code, editing React components, moving logic between files, writing tests, and asking the editor to explain errors from the terminal. The short version is simple: Cursor is excellent when a task crosses file boundaries. It is less convincing when you only need cheap inline completions. What Cursor Actually Is Cursor is a VS Code-based editor from Anysphere with AI built into the core experience. Extensions, settings, themes, terminal panes, source control, and the familiar layout are still there. The difference is that chat, agent-style edits, tab completion, codebase search, and model selection are treated as editor controls rather than add-ons. That matters in daily use. I found the chat panel most useful when I pointed it at a directory and asked for a narrow change, such as "move this validation into the shared helper and update the tests." Cursor could usually find the right files, make a first pass, and leave me with a readable diff. I still had to check naming, edge cases, and test coverage, but it saved the boring part of hunting through files. The Best Part: Multi-File Editing Cursor's strongest feature is multi-file editing with codebase context. A lot of AI coding assistants can finish a function. Fewer can update the component, the hook, the type definition, and the test in one pass without losing the shape of the project. In my experience, Cursor is at its best with medium-sized tasks. It handles "add a field to this form and wire it through the API call" better than "invent a new architecture." It also works well for cleanup: renaming a concept, extracting repeated logic, or adding a missing test around an existing pattern.

2026-07-07 原文 →
AI 资讯

agentic workflows are being domesticated by actions

GitHub's Agentic Workflows preview has the kind of headline that makes people reach for the wrong conclusion. Natural language Markdown can turn into GitHub Actions workflows. That sounds like "the YAML is going away." I do not think that is the interesting story. The interesting story is that the agent is not escaping the workflow engine. It is being pulled into it. That matters because a lot of agent demos still pretend the future is a smart process floating above the boring machinery: the agent understands the request, edits the repo, runs some commands, and hands back a neat result. Nice demo. Very clean. Production engineering is not clean like that. Production engineering has permissions, logs, runner groups, approval rules, secrets, firewalls, budgets, weird old repositories, compliance questions, and someone who has to explain what happened when the helpful automation did something surprising. So the shape of Agentic Workflows is useful precisely because it is less magical than the demo version. GitHub is putting agents inside the same CI/CD world that already carries a lot of organizational trust. That is the right direction. markdown is not the control plane The cute part is that a developer can describe a workflow in Markdown and have GitHub turn that into standard Actions YAML. That is useful. YAML is not a personality test, and most teams have better things to do than memorize every Actions syntax edge case. But Markdown is only the input surface. The control plane is still Actions. That distinction matters. If the generated workflow is a normal Actions workflow, then all the existing machinery can still matter: repository permissions, runner selection, logs, environments, approvals, branch protection, organization policy, and whatever security controls the company already built around CI. This is where I get more optimistic about agentic tooling. The bad version of agents asks every organization to trust a new, parallel execution model because the mode

2026-06-14 原文 →
AI 资讯

Coding-Agent Misalignment: Turn Failure Taxonomies into QA Checks

Coding agents are no longer just autocomplete with a longer prompt. GitHub describes Copilot cloud agent as software that can research a repository, create an implementation plan, make code changes on a branch, run in an ephemeral GitHub Actions-powered environment, and let a developer review or create a pull request afterward. OpenAI's Codex GitHub integration similarly positions code review as a repository-aware review pass that follows AGENTS.md guidance and focuses comments on serious issues. That shift changes the buyer question. The useful question is not "does the agent usually write code?" It is "can the team detect when the agent drifts away from the developer's intent before the change reaches production?" A May 2026 arXiv paper, "How Coding Agents Fail Their Users" , gives teams a better vocabulary for that review. The authors studied 20,574 real IDE and CLI coding-agent sessions across 1,639 repositories and define misalignment as a breakdown that becomes visible through developer correction or pushback. The paper reports seven recurring symptom categories: wrong project diagnosis, misread developer intent, developer constraint violation, self-initiated overreach, faulty implementation, operational execution error, and inaccurate self-reporting. Effloow Lab also ran a bounded OpenAI API check using three synthetic, non-confidential coding-agent transcript snippets. The run did not measure real-world incidence, compare vendors, or reproduce the paper. It produced a small rubric that maps visible symptoms to review gates such as diff-scope checks, evidence-before-edit checks, acceptance-criteria coverage, and verification-output requirements. The public lab note is available at /lab-runs/coding-agent-misalignment-failure-taxonomy-poc-2026 . This guide turns that research and lab output into a practical QA checklist for teams buying, piloting, or packaging coding-agent workflows. Why This Matters for Agent Buyers Coding-agent procurement often starts with p

2026-06-13 原文 →
AI 资讯

I Had 6 Side Projects Open in One Browser Window. Here's What That Was Costing Me.

I Had 6 Side Projects Open in One Browser Window. Here's What That Was Costing Me. I counted once, on a normal Tuesday. 41 tabs, one window, six different side projects. A repo here, a localhost there, a Stripe dashboard, two Notion pages, a half-read Stack Overflow thread I was scared to close. I was using a tab manager to hold it all together. Save the session, restore it later, feel organized. It worked, in the sense that nothing got lost. But something was off, and it took me a while to name it. The tab manager was keeping my tabs. It was not keeping my projects. And the gap between those two things was quietly costing me. The number that bothered me I did a rough audit of one week. Every time I sat down to work on a project, I had to reconstruct where I was. Which task was next? When was that thing due? Where did I save that reference last month? The tabs were there, but the answers were not in the tabs. I timed it loosely. Five to ten minutes of "wait, where was I" at the start of every session, multiplied across six projects, multiplied across a week. Call it an hour, maybe more, spent just getting back to the surface before any real work started. An hour a week is not a catastrophe. But it was an hour spent doing something a tool should do for me, and the friction was enough that I started avoiding the projects with the most tabs. The cost was not really the time. It was that the heaviest projects felt the worst to open, so I opened them least. Why the tab manager could not fix this Here is the thing I had to admit. A tab manager is excellent at one job: saving and restoring tabs. It is not built to know anything about the project those tabs belong to. A tab is a URL. A project is a URL plus: A task that is due Friday A reference I saved three weeks ago and need again now A subscription renewing on the 14th A sense of what I actually shipped last time I worked on it When all of that lives outside the tab manager, in a to-do app, a notes file, my memory, rest

2026-06-11 原文 →