标签:#c
找到 18588 篇相关文章
SpaceX and the myth of independent Wall St research
Modern Frontend Testing Is Mostly About State, Timing, and Geometry
Frontend testing used to sound simple: open a page, find an element, click it, and verify the result. That description still works for basic workflows, but modern interfaces are no longer a single static DOM that changes in obvious ways. Components can render inside Shadow DOM. Modals can be portaled to a different part of the document. Server-rendered HTML can be replaced during hydration. Content can move because of CSS container queries. A page can look finished while several progressive-loading states are still changing underneath it. The hardest frontend bugs now tend to sit at the intersection of three things: State: what the application believes is happening. Timing: when the browser and framework apply changes. Geometry: where elements appear and whether users can actually interact with them. A stable test strategy has to observe all three. Shadow DOM and portals break naive assumptions about element location Component encapsulation is useful, but it changes how automation finds and interacts with elements. A control inside an open shadow root is not always reachable through the same selector strategy used for the main document. A portaled modal may appear visually next to a component while being rendered near the end of document.body . Focus can move into the modal even though the DOM hierarchy suggests that it belongs elsewhere. This guide to testing Shadow DOM and portaled modals without breaking browser automation suites covers the key challenges. The test should verify behavior, not merely the presence of a node: Can the user reach the control? Is the expected element visible above overlays? Does keyboard focus enter the modal? Is focus trapped correctly? Does Escape close it? Does focus return to the triggering element? Can a screen reader identify its label and role? Selectors still matter, but interaction boundaries matter more. A test that locates a button hidden behind another layer is not testing what the user experiences. Hydration creates a peri
What a One-Line CSS Fix Taught Me About Code Review (My First Firefox Patch Feedback Loop)
What a One-Line CSS Fix Taught Me About Code Review (My First Firefox Patch Feedback Loop) When I started contributing to Firefox through Outreachy, I expected the hard part to be writing code. What actually taught me the most was a two-line CSS fix that a reviewer sent back — not because it was wrong, but because it wasn't quite right yet. Here's what happened with Bug 2026574 . The Bug In Firefox's Split View about:opentabs page, long strings in the search field were overflowing outside their container instead of wrapping. Visually, it broke the layout — text just spilled past its boundary instead of staying contained. My job: make the text wrap properly, without breaking anything else on the page. My First Attempt I went into moz-card.css and targeted the heading element directly: .moz-card-heading { overflow-wrap : break-word ; min-width : 0 ; } This worked, technically. The text wrapped. Locally, it looked fixed. I submitted the patch for review, feeling fairly confident — it was a small, contained change. The Feedback My reviewer, Tim Giles, came back with a better approach. Instead of targeting the heading specifically with two properties, he suggested applying a single, more precise rule to the parent .moz-card element: .moz-card { overflow-wrap : anywhere ; } overflow-wrap: anywhere is more aggressive than break-word — it allows breaks at any point when needed to prevent overflow, not just at existing break opportunities. And by moving it to .moz-card instead of just the heading, the fix covered the component more robustly instead of patching one specific element. It was a smaller diff. It solved the actual problem instead of the symptom I'd focused on. And it followed patterns already used elsewhere in the codebase. What I Actually Learned My first instinct, seeing feedback on a patch I thought was "done," was a small jolt of did I get this wrong? But that's not what was happening. Getting feedback on a first pass isn't failure — it's the normal shape of h
The Zoom hack that says, ‘Don’t record me’
If every meeting, watercooler conversation, and date gets transcribed and summarized, who's actually reading any of it?
Give your voice agent an email address for follow-ups
Every voice agent demo ends the same way. The bot wraps the call with a confident "Great — I'll email you the details and a confirmation," the human hangs up satisfied, and then nothing sends. There's no inbox behind the promise. The transcript lives in your voice stack, the "email" is a TODO nobody wired up, and the customer waits for a message that never arrives. It's the most common broken promise in conversational AI, and it's broken for a boring reason: the voice agent has no mailbox of its own. That's the gap this post closes. The interesting problem with voice agents isn't speech — your voice stack already handles the transcript, the turn-taking, and the summary. The interesting problem is the channel bridge : handing what happened on the call to a written, replyable email that comes from the agent and whose reply comes back to the agent . Voice in, email out, reply back in. No human in the loop, no shared support inbox, no spoofed noreply@ . The piece that makes this clean is a Nylas Agent Account — a real, owned email address that your voice agent sends from and receives at. I work on the Nylas CLI, so the terminal commands below are the exact ones I reach for, and I'll show both angles for every operation: the nylas command and the raw curl HTTP call. In practice your provisioning runs through the API and your ops glue runs through the CLI, so you'll want both. Why a real mailbox beats a fire-and-forget send Most teams reach for a transactional email API for this — SendGrid, SES, whatever's already in the stack — and fire a templated "here's your summary" off into the void. That works right up until the customer replies. Their reply hits a black hole ( noreply@ ), or worse, it lands in some shared support@ inbox where it's divorced from the call it answers. The agent that made the promise never sees the answer. An Agent Account is just a grant . It has a grant_id , and that ID works with every grant-scoped endpoint Nylas already exposes — Messages, Drafts,
Connect legacy tools to an agent mailbox over IMAP/SMTP
Most "AI email" integrations assume everything on the other side speaks REST. You wire up a webhook, you call POST /messages/send , and you move on. That works right up until you remember how much of your stack doesn't speak REST and never will: the ticketing system that ingests mail over IMAP, the backup script your predecessor wrote in 2014, the monitoring tool that only knows how to send SMTP, the compliance archiver that polls a mailbox every five minutes. None of those are getting rewritten to call an HTTP API for your demo. So here's the trick that makes a Nylas Agent Account genuinely useful in a real environment: it's not API-only. You can expose the same mailbox over IMAP and SMTP submission , hand the host, port, and credentials to one of those legacy tools, and let it read and send like it's talking to any old mail server. Meanwhile your agent drives that identical mailbox over the v3 API. Both surfaces hit one storage layer. A flag, move, or delete on either side shows up on the other within seconds. I work on the Nylas CLI, so the terminal commands below are the exact ones I reach for. As usual I'll show both angles for every operation — the raw curl against the API and the nylas command — because half the point of an Agent Account is that you can mix them freely. What you actually get An Agent Account is just a grant . It has a grant_id , and that grant_id works with every grant-scoped endpoint you already know — Messages, Drafts, Threads, Folders, Attachments, Contacts, Calendars, Events. There's nothing new to learn on the data plane. The IMAP/SMTP layer doesn't change that model. It adds a second door into the same room: One mailbox, two protocols. The API and the IMAP/SMTP server are two front-ends over the same backend. There is no sync job, no eventual-consistency window worth worrying about, no "API mailbox" versus "client mailbox." It's one mailbox. Legacy tools just work. Anything that can authenticate to an IMAP server with a username and pas
Interview with Matheus Moreira about Lone Lisp and Linux Kernel
Texas spent $4.5M in Spy SUVs that scan phones in 3 minutes
Friday Squid Blogging: Squid Washing Up on Cape Cod Beach
Lots of articles about this . As usual, you can also use this squid post to talk about the security stories in the news that I haven’t covered. Blog moderation policy.
Open Book Touch: open-source e-reader
Topcoat: The full full-stack framework for Rust
Faulty Towers, vibe sickness, and the vibe bobsled
Aurora DSQL: Scalable, Multi-Region OLTP
Static search trees: 40x faster than binary search (2024)
Agility Robotics plants its flag in Tesla’s backyard
Agility is opening a new training center for its Digit robots in Fremont, California.
Shark’s versatile ChillPill cooling system is back to its best price
Portable fans are one of the easiest ways to stay cool during the summer, and you don’t have to spend much to find a decent one. If you’re looking for something more versatile, though, Shark’s ChillPill Personal Fan and Cooling System combines a rechargeable fan with a dry-touch evaporative mister in a design that can […]